<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        
        <title>
            
    
                ORM Internals
             &mdash; 
    SQLAlchemy 0.8 Documentation

        </title>
        
    <link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
    <link rel="stylesheet" href="../_static/docs.css" type="text/css" />

    <script type="text/javascript">
      var DOCUMENTATION_OPTIONS = {
          URL_ROOT:    '../',
          VERSION:     '0.8.2',
          COLLAPSE_MODINDEX: false,
          FILE_SUFFIX: '.html'
      };
    </script>
        <script type="text/javascript" src="../_static/jquery.js"></script>
        <script type="text/javascript" src="../_static/underscore.js"></script>
        <script type="text/javascript" src="../_static/doctools.js"></script>
    <script type="text/javascript" src="../_static/init.js"></script>
    <link rel="index" title="Index" href="../genindex.html" />
    <link rel="search" title="Search" href="../search.html" />
        <link rel="copyright" title="Copyright" href="../copyright.html" />
    <link rel="top" title="SQLAlchemy 0.8 Documentation" href="../index.html" />
        <link rel="up" title="SQLAlchemy ORM" href="index.html" />
        <link rel="next" title="SQLAlchemy Core" href="../core/index.html" />
        <link rel="prev" title="ORM Exceptions" href="exceptions.html" />

    </head>
    <body>
        










<div id="docs-container">



<div id="docs-header">
    <h1>SQLAlchemy 0.8 Documentation</h1>

    <div id="docs-search">
    Search:
    <form class="search" action="../search.html" method="get">
      <input type="text" name="q" size="18" /> <input type="submit" value="Search" />
      <input type="hidden" name="check_keywords" value="yes" />
      <input type="hidden" name="area" value="default" />
    </form>
    </div>

    <div id="docs-version-header">
        Release: <span class="version-num">0.8.2</span> | Release Date: July 3, 2013


    </div>

</div>

<div id="docs-top-navigation">
    <div id="docs-top-page-control" class="docs-navigation-links">
        <ul>
            <li>Prev:
            <a href="exceptions.html" title="previous chapter">ORM Exceptions</a>
            </li>
            <li>Next:
            <a href="../core/index.html" title="next chapter">SQLAlchemy Core</a>
            </li>

        <li>
            <a href="../contents.html">Table of Contents</a> |
            <a href="../genindex.html">Index</a>
            | <a href="../_sources/orm/internals.txt">view source
        </li>
        </ul>
    </div>

    <div id="docs-navigation-banner">
        <a href="../index.html">SQLAlchemy 0.8 Documentation</a>
                » <a href="index.html" title="SQLAlchemy ORM">SQLAlchemy ORM</a>
        » 
                ORM Internals
             

        <h2>
            
                ORM Internals
            
        </h2>
    </div>

</div>

<div id="docs-body-container">

    <div id="docs-sidebar">
    <h3><a href="../index.html">Table of Contents</a></h3>
    <ul>
<li><a class="reference internal" href="#">ORM Internals</a></li>
</ul>


    <h4>Previous Topic</h4>
    <p>
    <a href="exceptions.html" title="previous chapter">ORM Exceptions</a>
    </p>
    <h4>Next Topic</h4>
    <p>
    <a href="../core/index.html" title="next chapter">SQLAlchemy Core</a>
    </p>


    <h4>Quick Search</h4>
    <p>
    <form class="search" action="../search.html" method="get">
      <input type="text" name="q" size="18" /> <input type="submit" value="Search" />
      <input type="hidden" name="check_keywords" value="yes" />
      <input type="hidden" name="area" value="default" />
    </form>
    </p>

    </div>

    <div id="docs-body" class="withsidebar" >
        
<div class="section" id="orm-internals">
<span id="orm-internal-toplevel"></span><h1>ORM Internals<a class="headerlink" href="#orm-internals" title="Permalink to this headline">¶</a></h1>
<p>Key ORM constructs, not otherwise covered in other
sections, are listed here.</p>
<dl class="class">
<dt id="sqlalchemy.orm.state.AttributeState">
<em class="property">class </em><tt class="descclassname">sqlalchemy.orm.state.</tt><tt class="descname">AttributeState</tt><big>(</big><em>state</em>, <em>key</em><big>)</big><a class="headerlink" href="#sqlalchemy.orm.state.AttributeState" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <tt class="xref py py-class docutils literal"><span class="pre">object</span></tt></p>
<p>Provide an inspection interface corresponding
to a particular attribute on a particular mapped object.</p>
<p>The <a class="reference internal" href="#sqlalchemy.orm.state.AttributeState" title="sqlalchemy.orm.state.AttributeState"><tt class="xref py py-class docutils literal"><span class="pre">AttributeState</span></tt></a> object is accessed
via the <tt class="xref py py-attr docutils literal"><span class="pre">InstanceState.attr</span></tt> collection
of a particular <a class="reference internal" href="#sqlalchemy.orm.state.InstanceState" title="sqlalchemy.orm.state.InstanceState"><tt class="xref py py-class docutils literal"><span class="pre">InstanceState</span></tt></a>:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="kn">from</span> <span class="nn">sqlalchemy</span> <span class="kn">import</span> <span class="n">inspect</span>

<span class="n">insp</span> <span class="o">=</span> <span class="n">inspect</span><span class="p">(</span><span class="n">some_mapped_object</span><span class="p">)</span>
<span class="n">attr_state</span> <span class="o">=</span> <span class="n">insp</span><span class="o">.</span><span class="n">attr</span><span class="o">.</span><span class="n">some_attribute</span></pre></div>
</div>
<dl class="attribute">
<dt id="sqlalchemy.orm.state.AttributeState.history">
<tt class="descname">history</tt><a class="headerlink" href="#sqlalchemy.orm.state.AttributeState.history" title="Permalink to this definition">¶</a></dt>
<dd><p>Return the current pre-flush change history for
this attribute, via the <a class="reference internal" href="session.html#sqlalchemy.orm.attributes.History" title="sqlalchemy.orm.attributes.History"><tt class="xref py py-class docutils literal"><span class="pre">History</span></tt></a> interface.</p>
</dd></dl>

<dl class="attribute">
<dt id="sqlalchemy.orm.state.AttributeState.loaded_value">
<tt class="descname">loaded_value</tt><a class="headerlink" href="#sqlalchemy.orm.state.AttributeState.loaded_value" title="Permalink to this definition">¶</a></dt>
<dd><p>The current value of this attribute as loaded from the database.</p>
<p>If the value has not been loaded, or is otherwise not present
in the object&#8217;s dictionary, returns NO_VALUE.</p>
</dd></dl>

<dl class="attribute">
<dt id="sqlalchemy.orm.state.AttributeState.value">
<tt class="descname">value</tt><a class="headerlink" href="#sqlalchemy.orm.state.AttributeState.value" title="Permalink to this definition">¶</a></dt>
<dd><p>Return the value of this attribute.</p>
<p>This operation is equivalent to accessing the object&#8217;s
attribute directly or via <tt class="docutils literal"><span class="pre">getattr()</span></tt>, and will fire
off any pending loader callables if needed.</p>
</dd></dl>

</dd></dl>

<dl class="class">
<dt id="sqlalchemy.orm.instrumentation.ClassManager">
<em class="property">class </em><tt class="descclassname">sqlalchemy.orm.instrumentation.</tt><tt class="descname">ClassManager</tt><big>(</big><em>class_</em><big>)</big><a class="headerlink" href="#sqlalchemy.orm.instrumentation.ClassManager" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <tt class="xref py py-class docutils literal"><span class="pre">dict</span></tt></p>
<p>tracks state information at the class level.</p>
<dl class="attribute">
<dt id="sqlalchemy.orm.instrumentation.ClassManager.__eq__">
<tt class="descname">__eq__</tt><a class="headerlink" href="#sqlalchemy.orm.instrumentation.ClassManager.__eq__" title="Permalink to this definition">¶</a></dt>
<dd><div class="inherited-member container">
<em>inherited from the</em> <tt class="xref py py-attr docutils literal"><span class="pre">__eq__</span></tt> <em>attribute of</em> <tt class="xref py py-class docutils literal"><span class="pre">dict</span></tt></div>
<p>x.__eq__(y) &lt;==&gt; x==y</p>
</dd></dl>

<dl class="attribute">
<dt id="sqlalchemy.orm.instrumentation.ClassManager.__le__">
<tt class="descname">__le__</tt><a class="headerlink" href="#sqlalchemy.orm.instrumentation.ClassManager.__le__" title="Permalink to this definition">¶</a></dt>
<dd><div class="inherited-member container">
<em>inherited from the</em> <tt class="xref py py-attr docutils literal"><span class="pre">__le__</span></tt> <em>attribute of</em> <tt class="xref py py-class docutils literal"><span class="pre">dict</span></tt></div>
<p>x.__le__(y) &lt;==&gt; x&lt;=y</p>
</dd></dl>

<dl class="attribute">
<dt id="sqlalchemy.orm.instrumentation.ClassManager.__lt__">
<tt class="descname">__lt__</tt><a class="headerlink" href="#sqlalchemy.orm.instrumentation.ClassManager.__lt__" title="Permalink to this definition">¶</a></dt>
<dd><div class="inherited-member container">
<em>inherited from the</em> <tt class="xref py py-attr docutils literal"><span class="pre">__lt__</span></tt> <em>attribute of</em> <tt class="xref py py-class docutils literal"><span class="pre">dict</span></tt></div>
<p>x.__lt__(y) &lt;==&gt; x&lt;y</p>
</dd></dl>

<dl class="attribute">
<dt id="sqlalchemy.orm.instrumentation.ClassManager.__ne__">
<tt class="descname">__ne__</tt><a class="headerlink" href="#sqlalchemy.orm.instrumentation.ClassManager.__ne__" title="Permalink to this definition">¶</a></dt>
<dd><div class="inherited-member container">
<em>inherited from the</em> <tt class="xref py py-attr docutils literal"><span class="pre">__ne__</span></tt> <em>attribute of</em> <tt class="xref py py-class docutils literal"><span class="pre">dict</span></tt></div>
<p>x.__ne__(y) &lt;==&gt; x!=y</p>
</dd></dl>

<dl class="method">
<dt id="sqlalchemy.orm.instrumentation.ClassManager.clear">
<tt class="descname">clear</tt><big>(</big><big>)</big> &rarr; None.  Remove all items from D.<a class="headerlink" href="#sqlalchemy.orm.instrumentation.ClassManager.clear" title="Permalink to this definition">¶</a></dt>
<dd><div class="inherited-member container">
<em>inherited from the</em> <tt class="xref py py-meth docutils literal"><span class="pre">clear()</span></tt> <em>method of</em> <tt class="xref py py-class docutils literal"><span class="pre">dict</span></tt></div>
</dd></dl>

<dl class="method">
<dt id="sqlalchemy.orm.instrumentation.ClassManager.copy">
<tt class="descname">copy</tt><big>(</big><big>)</big> &rarr; a shallow copy of D<a class="headerlink" href="#sqlalchemy.orm.instrumentation.ClassManager.copy" title="Permalink to this definition">¶</a></dt>
<dd><div class="inherited-member container">
<em>inherited from the</em> <tt class="xref py py-meth docutils literal"><span class="pre">copy()</span></tt> <em>method of</em> <tt class="xref py py-class docutils literal"><span class="pre">dict</span></tt></div>
</dd></dl>

<dl class="method">
<dt id="sqlalchemy.orm.instrumentation.ClassManager.dispose">
<tt class="descname">dispose</tt><big>(</big><big>)</big><a class="headerlink" href="#sqlalchemy.orm.instrumentation.ClassManager.dispose" title="Permalink to this definition">¶</a></dt>
<dd><p>Dissasociate this manager from its class.</p>
</dd></dl>

<dl class="staticmethod">
<dt id="sqlalchemy.orm.instrumentation.ClassManager.fromkeys">
<em class="property">static </em><tt class="descname">fromkeys</tt><big>(</big><em>S</em><span class="optional">[</span>, <em>v</em><span class="optional">]</span><big>)</big> &rarr; New dict with keys from S and values equal to v.<a class="headerlink" href="#sqlalchemy.orm.instrumentation.ClassManager.fromkeys" title="Permalink to this definition">¶</a></dt>
<dd><div class="inherited-member container">
<em>inherited from the</em> <tt class="xref py py-meth docutils literal"><span class="pre">fromkeys()</span></tt> <em>method of</em> <tt class="xref py py-class docutils literal"><span class="pre">dict</span></tt></div>
<p>v defaults to None.</p>
</dd></dl>

<dl class="method">
<dt id="sqlalchemy.orm.instrumentation.ClassManager.get">
<tt class="descname">get</tt><big>(</big><em>k</em><span class="optional">[</span>, <em>d</em><span class="optional">]</span><big>)</big> &rarr; D[k] if k in D, else d.  d defaults to None.<a class="headerlink" href="#sqlalchemy.orm.instrumentation.ClassManager.get" title="Permalink to this definition">¶</a></dt>
<dd><div class="inherited-member container">
<em>inherited from the</em> <tt class="xref py py-meth docutils literal"><span class="pre">get()</span></tt> <em>method of</em> <tt class="xref py py-class docutils literal"><span class="pre">dict</span></tt></div>
</dd></dl>

<dl class="method">
<dt id="sqlalchemy.orm.instrumentation.ClassManager.has_key">
<tt class="descname">has_key</tt><big>(</big><em>k</em><big>)</big> &rarr; True if D has a key k, else False<a class="headerlink" href="#sqlalchemy.orm.instrumentation.ClassManager.has_key" title="Permalink to this definition">¶</a></dt>
<dd><div class="inherited-member container">
<em>inherited from the</em> <tt class="xref py py-meth docutils literal"><span class="pre">has_key()</span></tt> <em>method of</em> <tt class="xref py py-class docutils literal"><span class="pre">dict</span></tt></div>
</dd></dl>

<dl class="method">
<dt id="sqlalchemy.orm.instrumentation.ClassManager.has_parent">
<tt class="descname">has_parent</tt><big>(</big><em>state</em>, <em>key</em>, <em>optimistic=False</em><big>)</big><a class="headerlink" href="#sqlalchemy.orm.instrumentation.ClassManager.has_parent" title="Permalink to this definition">¶</a></dt>
<dd><p>TODO</p>
</dd></dl>

<dl class="method">
<dt id="sqlalchemy.orm.instrumentation.ClassManager.items">
<tt class="descname">items</tt><big>(</big><big>)</big> &rarr; list of D's (key, value) pairs, as 2-tuples<a class="headerlink" href="#sqlalchemy.orm.instrumentation.ClassManager.items" title="Permalink to this definition">¶</a></dt>
<dd><div class="inherited-member container">
<em>inherited from the</em> <tt class="xref py py-meth docutils literal"><span class="pre">items()</span></tt> <em>method of</em> <tt class="xref py py-class docutils literal"><span class="pre">dict</span></tt></div>
</dd></dl>

<dl class="method">
<dt id="sqlalchemy.orm.instrumentation.ClassManager.iteritems">
<tt class="descname">iteritems</tt><big>(</big><big>)</big> &rarr; an iterator over the (key, value) items of D<a class="headerlink" href="#sqlalchemy.orm.instrumentation.ClassManager.iteritems" title="Permalink to this definition">¶</a></dt>
<dd><div class="inherited-member container">
<em>inherited from the</em> <tt class="xref py py-meth docutils literal"><span class="pre">iteritems()</span></tt> <em>method of</em> <tt class="xref py py-class docutils literal"><span class="pre">dict</span></tt></div>
</dd></dl>

<dl class="method">
<dt id="sqlalchemy.orm.instrumentation.ClassManager.iterkeys">
<tt class="descname">iterkeys</tt><big>(</big><big>)</big> &rarr; an iterator over the keys of D<a class="headerlink" href="#sqlalchemy.orm.instrumentation.ClassManager.iterkeys" title="Permalink to this definition">¶</a></dt>
<dd><div class="inherited-member container">
<em>inherited from the</em> <tt class="xref py py-meth docutils literal"><span class="pre">iterkeys()</span></tt> <em>method of</em> <tt class="xref py py-class docutils literal"><span class="pre">dict</span></tt></div>
</dd></dl>

<dl class="method">
<dt id="sqlalchemy.orm.instrumentation.ClassManager.itervalues">
<tt class="descname">itervalues</tt><big>(</big><big>)</big> &rarr; an iterator over the values of D<a class="headerlink" href="#sqlalchemy.orm.instrumentation.ClassManager.itervalues" title="Permalink to this definition">¶</a></dt>
<dd><div class="inherited-member container">
<em>inherited from the</em> <tt class="xref py py-meth docutils literal"><span class="pre">itervalues()</span></tt> <em>method of</em> <tt class="xref py py-class docutils literal"><span class="pre">dict</span></tt></div>
</dd></dl>

<dl class="method">
<dt id="sqlalchemy.orm.instrumentation.ClassManager.keys">
<tt class="descname">keys</tt><big>(</big><big>)</big> &rarr; list of D's keys<a class="headerlink" href="#sqlalchemy.orm.instrumentation.ClassManager.keys" title="Permalink to this definition">¶</a></dt>
<dd><div class="inherited-member container">
<em>inherited from the</em> <tt class="xref py py-meth docutils literal"><span class="pre">keys()</span></tt> <em>method of</em> <tt class="xref py py-class docutils literal"><span class="pre">dict</span></tt></div>
</dd></dl>

<dl class="method">
<dt id="sqlalchemy.orm.instrumentation.ClassManager.manage">
<tt class="descname">manage</tt><big>(</big><big>)</big><a class="headerlink" href="#sqlalchemy.orm.instrumentation.ClassManager.manage" title="Permalink to this definition">¶</a></dt>
<dd><p>Mark this instance as the manager for its class.</p>
</dd></dl>

<dl class="attribute">
<dt id="sqlalchemy.orm.instrumentation.ClassManager.original_init">
<tt class="descname">original_init</tt><a class="headerlink" href="#sqlalchemy.orm.instrumentation.ClassManager.original_init" title="Permalink to this definition">¶</a></dt>
<dd><p>x.__init__(...) initializes x; see help(type(x)) for signature</p>
</dd></dl>

<dl class="method">
<dt id="sqlalchemy.orm.instrumentation.ClassManager.pop">
<tt class="descname">pop</tt><big>(</big><em>k</em><span class="optional">[</span>, <em>d</em><span class="optional">]</span><big>)</big> &rarr; v, remove specified key and return the corresponding value.<a class="headerlink" href="#sqlalchemy.orm.instrumentation.ClassManager.pop" title="Permalink to this definition">¶</a></dt>
<dd><div class="inherited-member container">
<em>inherited from the</em> <tt class="xref py py-meth docutils literal"><span class="pre">pop()</span></tt> <em>method of</em> <tt class="xref py py-class docutils literal"><span class="pre">dict</span></tt></div>
<p>If key is not found, d is returned if given, otherwise KeyError is raised</p>
</dd></dl>

<dl class="method">
<dt id="sqlalchemy.orm.instrumentation.ClassManager.popitem">
<tt class="descname">popitem</tt><big>(</big><big>)</big> &rarr; (k, v), remove and return some (key, value) pair as a<a class="headerlink" href="#sqlalchemy.orm.instrumentation.ClassManager.popitem" title="Permalink to this definition">¶</a></dt>
<dd><div class="inherited-member container">
<em>inherited from the</em> <tt class="xref py py-meth docutils literal"><span class="pre">popitem()</span></tt> <em>method of</em> <tt class="xref py py-class docutils literal"><span class="pre">dict</span></tt></div>
<p>2-tuple; but raise KeyError if D is empty.</p>
</dd></dl>

<dl class="method">
<dt id="sqlalchemy.orm.instrumentation.ClassManager.setdefault">
<tt class="descname">setdefault</tt><big>(</big><em>k</em><span class="optional">[</span>, <em>d</em><span class="optional">]</span><big>)</big> &rarr; D.get(k,d), also set D[k]=d if k not in D<a class="headerlink" href="#sqlalchemy.orm.instrumentation.ClassManager.setdefault" title="Permalink to this definition">¶</a></dt>
<dd><div class="inherited-member container">
<em>inherited from the</em> <tt class="xref py py-meth docutils literal"><span class="pre">setdefault()</span></tt> <em>method of</em> <tt class="xref py py-class docutils literal"><span class="pre">dict</span></tt></div>
</dd></dl>

<dl class="classmethod">
<dt id="sqlalchemy.orm.instrumentation.ClassManager.state_getter">
<em class="property">classmethod </em><tt class="descname">state_getter</tt><big>(</big><big>)</big><a class="headerlink" href="#sqlalchemy.orm.instrumentation.ClassManager.state_getter" title="Permalink to this definition">¶</a></dt>
<dd><p>Return a (instance) -&gt; InstanceState callable.</p>
<p>&#8220;state getter&#8221; callables should raise either KeyError or
AttributeError if no InstanceState could be found for the
instance.</p>
</dd></dl>

<dl class="method">
<dt id="sqlalchemy.orm.instrumentation.ClassManager.unregister">
<tt class="descname">unregister</tt><big>(</big><big>)</big><a class="headerlink" href="#sqlalchemy.orm.instrumentation.ClassManager.unregister" title="Permalink to this definition">¶</a></dt>
<dd><p>remove all instrumentation established by this ClassManager.</p>
</dd></dl>

<dl class="method">
<dt id="sqlalchemy.orm.instrumentation.ClassManager.update">
<tt class="descname">update</tt><big>(</big><span class="optional">[</span><em>E</em><span class="optional">]</span>, <em>**F</em><big>)</big> &rarr; None.  Update D from dict/iterable E and F.<a class="headerlink" href="#sqlalchemy.orm.instrumentation.ClassManager.update" title="Permalink to this definition">¶</a></dt>
<dd><div class="inherited-member container">
<em>inherited from the</em> <tt class="xref py py-meth docutils literal"><span class="pre">update()</span></tt> <em>method of</em> <tt class="xref py py-class docutils literal"><span class="pre">dict</span></tt></div>
<p>If E present and has a .keys() method, does:     for k in E: D[k] = E[k]
If E present and lacks .keys() method, does:     for (k, v) in E: D[k] = v
In either case, this is followed by: for k in F: D[k] = F[k]</p>
</dd></dl>

<dl class="method">
<dt id="sqlalchemy.orm.instrumentation.ClassManager.values">
<tt class="descname">values</tt><big>(</big><big>)</big> &rarr; list of D's values<a class="headerlink" href="#sqlalchemy.orm.instrumentation.ClassManager.values" title="Permalink to this definition">¶</a></dt>
<dd><div class="inherited-member container">
<em>inherited from the</em> <tt class="xref py py-meth docutils literal"><span class="pre">values()</span></tt> <em>method of</em> <tt class="xref py py-class docutils literal"><span class="pre">dict</span></tt></div>
</dd></dl>

<dl class="method">
<dt id="sqlalchemy.orm.instrumentation.ClassManager.viewitems">
<tt class="descname">viewitems</tt><big>(</big><big>)</big> &rarr; a set-like object providing a view on D's items<a class="headerlink" href="#sqlalchemy.orm.instrumentation.ClassManager.viewitems" title="Permalink to this definition">¶</a></dt>
<dd><div class="inherited-member container">
<em>inherited from the</em> <tt class="xref py py-meth docutils literal"><span class="pre">viewitems()</span></tt> <em>method of</em> <tt class="xref py py-class docutils literal"><span class="pre">dict</span></tt></div>
</dd></dl>

<dl class="method">
<dt id="sqlalchemy.orm.instrumentation.ClassManager.viewkeys">
<tt class="descname">viewkeys</tt><big>(</big><big>)</big> &rarr; a set-like object providing a view on D's keys<a class="headerlink" href="#sqlalchemy.orm.instrumentation.ClassManager.viewkeys" title="Permalink to this definition">¶</a></dt>
<dd><div class="inherited-member container">
<em>inherited from the</em> <tt class="xref py py-meth docutils literal"><span class="pre">viewkeys()</span></tt> <em>method of</em> <tt class="xref py py-class docutils literal"><span class="pre">dict</span></tt></div>
</dd></dl>

<dl class="method">
<dt id="sqlalchemy.orm.instrumentation.ClassManager.viewvalues">
<tt class="descname">viewvalues</tt><big>(</big><big>)</big> &rarr; an object providing a view on D's values<a class="headerlink" href="#sqlalchemy.orm.instrumentation.ClassManager.viewvalues" title="Permalink to this definition">¶</a></dt>
<dd><div class="inherited-member container">
<em>inherited from the</em> <tt class="xref py py-meth docutils literal"><span class="pre">viewvalues()</span></tt> <em>method of</em> <tt class="xref py py-class docutils literal"><span class="pre">dict</span></tt></div>
</dd></dl>

</dd></dl>

<dl class="class">
<dt id="sqlalchemy.orm.properties.ColumnProperty">
<em class="property">class </em><tt class="descclassname">sqlalchemy.orm.properties.</tt><tt class="descname">ColumnProperty</tt><big>(</big><em>*columns</em>, <em>**kwargs</em><big>)</big><a class="headerlink" href="#sqlalchemy.orm.properties.ColumnProperty" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <tt class="xref py py-class docutils literal"><span class="pre">sqlalchemy.orm.interfaces.StrategizedProperty</span></tt></p>
<p>Describes an object attribute that corresponds to a table column.</p>
<p>Public constructor is the <a class="reference internal" href="mapper_config.html#sqlalchemy.orm.column_property" title="sqlalchemy.orm.column_property"><tt class="xref py py-func docutils literal"><span class="pre">orm.column_property()</span></tt></a> function.</p>
<dl class="attribute">
<dt id="sqlalchemy.orm.properties.ColumnProperty.ColumnComparator">
<tt class="descname">ColumnComparator</tt><a class="headerlink" href="#sqlalchemy.orm.properties.ColumnProperty.ColumnComparator" title="Permalink to this definition">¶</a></dt>
<dd><p>alias of <tt class="xref py py-class docutils literal"><span class="pre">Comparator</span></tt></p>
</dd></dl>

<dl class="class">
<dt id="sqlalchemy.orm.properties.ColumnProperty.Comparator">
<em class="property">class </em><tt class="descname">Comparator</tt><big>(</big><em>prop</em>, <em>parentmapper</em>, <em>adapter=None</em><big>)</big><a class="headerlink" href="#sqlalchemy.orm.properties.ColumnProperty.Comparator" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#sqlalchemy.orm.interfaces.PropComparator" title="sqlalchemy.orm.interfaces.PropComparator"><tt class="xref py py-class docutils literal"><span class="pre">sqlalchemy.orm.interfaces.PropComparator</span></tt></a></p>
<p>Produce boolean, comparison, and other operators for
<a class="reference internal" href="#sqlalchemy.orm.properties.ColumnProperty" title="sqlalchemy.orm.properties.ColumnProperty"><tt class="xref py py-class docutils literal"><span class="pre">ColumnProperty</span></tt></a> attributes.</p>
<p>See the documentation for <a class="reference internal" href="#sqlalchemy.orm.interfaces.PropComparator" title="sqlalchemy.orm.interfaces.PropComparator"><tt class="xref py py-class docutils literal"><span class="pre">PropComparator</span></tt></a> for a brief
overview.</p>
<p>See also:</p>
<p><a class="reference internal" href="#sqlalchemy.orm.interfaces.PropComparator" title="sqlalchemy.orm.interfaces.PropComparator"><tt class="xref py py-class docutils literal"><span class="pre">PropComparator</span></tt></a></p>
<p><a class="reference internal" href="../core/expression_api.html#sqlalchemy.sql.operators.ColumnOperators" title="sqlalchemy.sql.operators.ColumnOperators"><tt class="xref py py-class docutils literal"><span class="pre">ColumnOperators</span></tt></a></p>
<p><a class="reference internal" href="../core/types.html#types-operators"><em>Redefining and Creating New Operators</em></a></p>
<p><a class="reference internal" href="../core/types.html#sqlalchemy.types.TypeEngine.comparator_factory" title="sqlalchemy.types.TypeEngine.comparator_factory"><tt class="xref py py-attr docutils literal"><span class="pre">TypeEngine.comparator_factory</span></tt></a></p>
<dl class="method">
<dt id="sqlalchemy.orm.properties.ColumnProperty.Comparator.__eq__">
<tt class="descname">__eq__</tt><big>(</big><em>other</em><big>)</big><a class="headerlink" href="#sqlalchemy.orm.properties.ColumnProperty.Comparator.__eq__" title="Permalink to this definition">¶</a></dt>
<dd><div class="inherited-member container">
<em>inherited from the</em> <a class="reference internal" href="../core/expression_api.html#sqlalchemy.sql.operators.ColumnOperators.__eq__" title="sqlalchemy.sql.operators.ColumnOperators.__eq__"><tt class="xref py py-meth docutils literal"><span class="pre">__eq__()</span></tt></a> <em>method of</em> <a class="reference internal" href="../core/expression_api.html#sqlalchemy.sql.operators.ColumnOperators" title="sqlalchemy.sql.operators.ColumnOperators"><tt class="xref py py-class docutils literal"><span class="pre">ColumnOperators</span></tt></a></div>
<p>Implement the <tt class="docutils literal"><span class="pre">==</span></tt> operator.</p>
<p>In a column context, produces the clause <tt class="docutils literal"><span class="pre">a</span> <span class="pre">=</span> <span class="pre">b</span></tt>.
If the target is <tt class="docutils literal"><span class="pre">None</span></tt>, produces <tt class="docutils literal"><span class="pre">a</span> <span class="pre">IS</span> <span class="pre">NULL</span></tt>.</p>
</dd></dl>

<dl class="method">
<dt id="sqlalchemy.orm.properties.ColumnProperty.Comparator.__le__">
<tt class="descname">__le__</tt><big>(</big><em>other</em><big>)</big><a class="headerlink" href="#sqlalchemy.orm.properties.ColumnProperty.Comparator.__le__" title="Permalink to this definition">¶</a></dt>
<dd><div class="inherited-member container">
<em>inherited from the</em> <a class="reference internal" href="../core/expression_api.html#sqlalchemy.sql.operators.ColumnOperators.__le__" title="sqlalchemy.sql.operators.ColumnOperators.__le__"><tt class="xref py py-meth docutils literal"><span class="pre">__le__()</span></tt></a> <em>method of</em> <a class="reference internal" href="../core/expression_api.html#sqlalchemy.sql.operators.ColumnOperators" title="sqlalchemy.sql.operators.ColumnOperators"><tt class="xref py py-class docutils literal"><span class="pre">ColumnOperators</span></tt></a></div>
<p>Implement the <tt class="docutils literal"><span class="pre">&lt;=</span></tt> operator.</p>
<p>In a column context, produces the clause <tt class="docutils literal"><span class="pre">a</span> <span class="pre">&lt;=</span> <span class="pre">b</span></tt>.</p>
</dd></dl>

<dl class="method">
<dt id="sqlalchemy.orm.properties.ColumnProperty.Comparator.__lt__">
<tt class="descname">__lt__</tt><big>(</big><em>other</em><big>)</big><a class="headerlink" href="#sqlalchemy.orm.properties.ColumnProperty.Comparator.__lt__" title="Permalink to this definition">¶</a></dt>
<dd><div class="inherited-member container">
<em>inherited from the</em> <a class="reference internal" href="../core/expression_api.html#sqlalchemy.sql.operators.ColumnOperators.__lt__" title="sqlalchemy.sql.operators.ColumnOperators.__lt__"><tt class="xref py py-meth docutils literal"><span class="pre">__lt__()</span></tt></a> <em>method of</em> <a class="reference internal" href="../core/expression_api.html#sqlalchemy.sql.operators.ColumnOperators" title="sqlalchemy.sql.operators.ColumnOperators"><tt class="xref py py-class docutils literal"><span class="pre">ColumnOperators</span></tt></a></div>
<p>Implement the <tt class="docutils literal"><span class="pre">&lt;</span></tt> operator.</p>
<p>In a column context, produces the clause <tt class="docutils literal"><span class="pre">a</span> <span class="pre">&lt;</span> <span class="pre">b</span></tt>.</p>
</dd></dl>

<dl class="method">
<dt id="sqlalchemy.orm.properties.ColumnProperty.Comparator.__ne__">
<tt class="descname">__ne__</tt><big>(</big><em>other</em><big>)</big><a class="headerlink" href="#sqlalchemy.orm.properties.ColumnProperty.Comparator.__ne__" title="Permalink to this definition">¶</a></dt>
<dd><div class="inherited-member container">
<em>inherited from the</em> <a class="reference internal" href="../core/expression_api.html#sqlalchemy.sql.operators.ColumnOperators.__ne__" title="sqlalchemy.sql.operators.ColumnOperators.__ne__"><tt class="xref py py-meth docutils literal"><span class="pre">__ne__()</span></tt></a> <em>method of</em> <a class="reference internal" href="../core/expression_api.html#sqlalchemy.sql.operators.ColumnOperators" title="sqlalchemy.sql.operators.ColumnOperators"><tt class="xref py py-class docutils literal"><span class="pre">ColumnOperators</span></tt></a></div>
<p>Implement the <tt class="docutils literal"><span class="pre">!=</span></tt> operator.</p>
<p>In a column context, produces the clause <tt class="docutils literal"><span class="pre">a</span> <span class="pre">!=</span> <span class="pre">b</span></tt>.
If the target is <tt class="docutils literal"><span class="pre">None</span></tt>, produces <tt class="docutils literal"><span class="pre">a</span> <span class="pre">IS</span> <span class="pre">NOT</span> <span class="pre">NULL</span></tt>.</p>
</dd></dl>

<dl class="method">
<dt id="sqlalchemy.orm.properties.ColumnProperty.Comparator.adapted">
<tt class="descname">adapted</tt><big>(</big><em>adapter</em><big>)</big><a class="headerlink" href="#sqlalchemy.orm.properties.ColumnProperty.Comparator.adapted" title="Permalink to this definition">¶</a></dt>
<dd><div class="inherited-member container">
<em>inherited from the</em> <a class="reference internal" href="#sqlalchemy.orm.interfaces.PropComparator.adapted" title="sqlalchemy.orm.interfaces.PropComparator.adapted"><tt class="xref py py-meth docutils literal"><span class="pre">adapted()</span></tt></a> <em>method of</em> <a class="reference internal" href="#sqlalchemy.orm.interfaces.PropComparator" title="sqlalchemy.orm.interfaces.PropComparator"><tt class="xref py py-class docutils literal"><span class="pre">PropComparator</span></tt></a></div>
<p>Return a copy of this PropComparator which will use the given
adaption function on the local side of generated expressions.</p>
</dd></dl>

<dl class="method">
<dt id="sqlalchemy.orm.properties.ColumnProperty.Comparator.any">
<tt class="descname">any</tt><big>(</big><em>criterion=None</em>, <em>**kwargs</em><big>)</big><a class="headerlink" href="#sqlalchemy.orm.properties.ColumnProperty.Comparator.any" title="Permalink to this definition">¶</a></dt>
<dd><div class="inherited-member container">
<em>inherited from the</em> <a class="reference internal" href="#sqlalchemy.orm.interfaces.PropComparator.any" title="sqlalchemy.orm.interfaces.PropComparator.any"><tt class="xref py py-meth docutils literal"><span class="pre">any()</span></tt></a> <em>method of</em> <a class="reference internal" href="#sqlalchemy.orm.interfaces.PropComparator" title="sqlalchemy.orm.interfaces.PropComparator"><tt class="xref py py-class docutils literal"><span class="pre">PropComparator</span></tt></a></div>
<p>Return true if this collection contains any member that meets the
given criterion.</p>
<p>The usual implementation of <tt class="docutils literal"><span class="pre">any()</span></tt> is
<a class="reference internal" href="#sqlalchemy.orm.properties.RelationshipProperty.Comparator.any" title="sqlalchemy.orm.properties.RelationshipProperty.Comparator.any"><tt class="xref py py-meth docutils literal"><span class="pre">RelationshipProperty.Comparator.any()</span></tt></a>.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
<li><strong>criterion</strong> &#8211; an optional ClauseElement formulated against the
member class&#8217; table or attributes.</li>
<li><strong>**kwargs</strong> &#8211; key/value pairs corresponding to member class
attribute names which will be compared via equality to the
corresponding values.</li>
</ul>
</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="sqlalchemy.orm.properties.ColumnProperty.Comparator.asc">
<tt class="descname">asc</tt><big>(</big><big>)</big><a class="headerlink" href="#sqlalchemy.orm.properties.ColumnProperty.Comparator.asc" title="Permalink to this definition">¶</a></dt>
<dd><div class="inherited-member container">
<em>inherited from the</em> <a class="reference internal" href="../core/expression_api.html#sqlalchemy.sql.operators.ColumnOperators.asc" title="sqlalchemy.sql.operators.ColumnOperators.asc"><tt class="xref py py-meth docutils literal"><span class="pre">asc()</span></tt></a> <em>method of</em> <a class="reference internal" href="../core/expression_api.html#sqlalchemy.sql.operators.ColumnOperators" title="sqlalchemy.sql.operators.ColumnOperators"><tt class="xref py py-class docutils literal"><span class="pre">ColumnOperators</span></tt></a></div>
<p>Produce a <a class="reference internal" href="../core/expression_api.html#sqlalchemy.sql.expression.asc" title="sqlalchemy.sql.expression.asc"><tt class="xref py py-func docutils literal"><span class="pre">asc()</span></tt></a> clause against the
parent object.</p>
</dd></dl>

<dl class="method">
<dt id="sqlalchemy.orm.properties.ColumnProperty.Comparator.between">
<tt class="descname">between</tt><big>(</big><em>cleft</em>, <em>cright</em><big>)</big><a class="headerlink" href="#sqlalchemy.orm.properties.ColumnProperty.Comparator.between" title="Permalink to this definition">¶</a></dt>
<dd><div class="inherited-member container">
<em>inherited from the</em> <a class="reference internal" href="../core/expression_api.html#sqlalchemy.sql.operators.ColumnOperators.between" title="sqlalchemy.sql.operators.ColumnOperators.between"><tt class="xref py py-meth docutils literal"><span class="pre">between()</span></tt></a> <em>method of</em> <a class="reference internal" href="../core/expression_api.html#sqlalchemy.sql.operators.ColumnOperators" title="sqlalchemy.sql.operators.ColumnOperators"><tt class="xref py py-class docutils literal"><span class="pre">ColumnOperators</span></tt></a></div>
<p>Produce a <a class="reference internal" href="../core/expression_api.html#sqlalchemy.sql.expression.between" title="sqlalchemy.sql.expression.between"><tt class="xref py py-func docutils literal"><span class="pre">between()</span></tt></a> clause against
the parent object, given the lower and upper range.</p>
</dd></dl>

<dl class="method">
<dt id="sqlalchemy.orm.properties.ColumnProperty.Comparator.collate">
<tt class="descname">collate</tt><big>(</big><em>collation</em><big>)</big><a class="headerlink" href="#sqlalchemy.orm.properties.ColumnProperty.Comparator.collate" title="Permalink to this definition">¶</a></dt>
<dd><div class="inherited-member container">
<em>inherited from the</em> <a class="reference internal" href="../core/expression_api.html#sqlalchemy.sql.operators.ColumnOperators.collate" title="sqlalchemy.sql.operators.ColumnOperators.collate"><tt class="xref py py-meth docutils literal"><span class="pre">collate()</span></tt></a> <em>method of</em> <a class="reference internal" href="../core/expression_api.html#sqlalchemy.sql.operators.ColumnOperators" title="sqlalchemy.sql.operators.ColumnOperators"><tt class="xref py py-class docutils literal"><span class="pre">ColumnOperators</span></tt></a></div>
<p>Produce a <a class="reference internal" href="../core/expression_api.html#sqlalchemy.sql.expression.collate" title="sqlalchemy.sql.expression.collate"><tt class="xref py py-func docutils literal"><span class="pre">collate()</span></tt></a> clause against
the parent object, given the collation string.</p>
</dd></dl>

<dl class="method">
<dt id="sqlalchemy.orm.properties.ColumnProperty.Comparator.concat">
<tt class="descname">concat</tt><big>(</big><em>other</em><big>)</big><a class="headerlink" href="#sqlalchemy.orm.properties.ColumnProperty.Comparator.concat" title="Permalink to this definition">¶</a></dt>
<dd><div class="inherited-member container">
<em>inherited from the</em> <a class="reference internal" href="../core/expression_api.html#sqlalchemy.sql.operators.ColumnOperators.concat" title="sqlalchemy.sql.operators.ColumnOperators.concat"><tt class="xref py py-meth docutils literal"><span class="pre">concat()</span></tt></a> <em>method of</em> <a class="reference internal" href="../core/expression_api.html#sqlalchemy.sql.operators.ColumnOperators" title="sqlalchemy.sql.operators.ColumnOperators"><tt class="xref py py-class docutils literal"><span class="pre">ColumnOperators</span></tt></a></div>
<p>Implement the &#8216;concat&#8217; operator.</p>
<p>In a column context, produces the clause <tt class="docutils literal"><span class="pre">a</span> <span class="pre">||</span> <span class="pre">b</span></tt>,
or uses the <tt class="docutils literal"><span class="pre">concat()</span></tt> operator on MySQL.</p>
</dd></dl>

<dl class="method">
<dt id="sqlalchemy.orm.properties.ColumnProperty.Comparator.contains">
<tt class="descname">contains</tt><big>(</big><em>other</em>, <em>**kwargs</em><big>)</big><a class="headerlink" href="#sqlalchemy.orm.properties.ColumnProperty.Comparator.contains" title="Permalink to this definition">¶</a></dt>
<dd><div class="inherited-member container">
<em>inherited from the</em> <a class="reference internal" href="../core/expression_api.html#sqlalchemy.sql.operators.ColumnOperators.contains" title="sqlalchemy.sql.operators.ColumnOperators.contains"><tt class="xref py py-meth docutils literal"><span class="pre">contains()</span></tt></a> <em>method of</em> <a class="reference internal" href="../core/expression_api.html#sqlalchemy.sql.operators.ColumnOperators" title="sqlalchemy.sql.operators.ColumnOperators"><tt class="xref py py-class docutils literal"><span class="pre">ColumnOperators</span></tt></a></div>
<p>Implement the &#8216;contains&#8217; operator.</p>
<p>In a column context, produces the clause <tt class="docutils literal"><span class="pre">LIKE</span> <span class="pre">'%&lt;other&gt;%'</span></tt></p>
</dd></dl>

<dl class="method">
<dt id="sqlalchemy.orm.properties.ColumnProperty.Comparator.desc">
<tt class="descname">desc</tt><big>(</big><big>)</big><a class="headerlink" href="#sqlalchemy.orm.properties.ColumnProperty.Comparator.desc" title="Permalink to this definition">¶</a></dt>
<dd><div class="inherited-member container">
<em>inherited from the</em> <a class="reference internal" href="../core/expression_api.html#sqlalchemy.sql.operators.ColumnOperators.desc" title="sqlalchemy.sql.operators.ColumnOperators.desc"><tt class="xref py py-meth docutils literal"><span class="pre">desc()</span></tt></a> <em>method of</em> <a class="reference internal" href="../core/expression_api.html#sqlalchemy.sql.operators.ColumnOperators" title="sqlalchemy.sql.operators.ColumnOperators"><tt class="xref py py-class docutils literal"><span class="pre">ColumnOperators</span></tt></a></div>
<p>Produce a <a class="reference internal" href="../core/expression_api.html#sqlalchemy.sql.expression.desc" title="sqlalchemy.sql.expression.desc"><tt class="xref py py-func docutils literal"><span class="pre">desc()</span></tt></a> clause against the
parent object.</p>
</dd></dl>

<dl class="method">
<dt id="sqlalchemy.orm.properties.ColumnProperty.Comparator.distinct">
<tt class="descname">distinct</tt><big>(</big><big>)</big><a class="headerlink" href="#sqlalchemy.orm.properties.ColumnProperty.Comparator.distinct" title="Permalink to this definition">¶</a></dt>
<dd><div class="inherited-member container">
<em>inherited from the</em> <a class="reference internal" href="../core/expression_api.html#sqlalchemy.sql.operators.ColumnOperators.distinct" title="sqlalchemy.sql.operators.ColumnOperators.distinct"><tt class="xref py py-meth docutils literal"><span class="pre">distinct()</span></tt></a> <em>method of</em> <a class="reference internal" href="../core/expression_api.html#sqlalchemy.sql.operators.ColumnOperators" title="sqlalchemy.sql.operators.ColumnOperators"><tt class="xref py py-class docutils literal"><span class="pre">ColumnOperators</span></tt></a></div>
<p>Produce a <a class="reference internal" href="../core/expression_api.html#sqlalchemy.sql.expression.distinct" title="sqlalchemy.sql.expression.distinct"><tt class="xref py py-func docutils literal"><span class="pre">distinct()</span></tt></a> clause against the
parent object.</p>
</dd></dl>

<dl class="method">
<dt id="sqlalchemy.orm.properties.ColumnProperty.Comparator.endswith">
<tt class="descname">endswith</tt><big>(</big><em>other</em>, <em>**kwargs</em><big>)</big><a class="headerlink" href="#sqlalchemy.orm.properties.ColumnProperty.Comparator.endswith" title="Permalink to this definition">¶</a></dt>
<dd><div class="inherited-member container">
<em>inherited from the</em> <a class="reference internal" href="../core/expression_api.html#sqlalchemy.sql.operators.ColumnOperators.endswith" title="sqlalchemy.sql.operators.ColumnOperators.endswith"><tt class="xref py py-meth docutils literal"><span class="pre">endswith()</span></tt></a> <em>method of</em> <a class="reference internal" href="../core/expression_api.html#sqlalchemy.sql.operators.ColumnOperators" title="sqlalchemy.sql.operators.ColumnOperators"><tt class="xref py py-class docutils literal"><span class="pre">ColumnOperators</span></tt></a></div>
<p>Implement the &#8216;endswith&#8217; operator.</p>
<p>In a column context, produces the clause <tt class="docutils literal"><span class="pre">LIKE</span> <span class="pre">'%&lt;other&gt;'</span></tt></p>
</dd></dl>

<dl class="method">
<dt id="sqlalchemy.orm.properties.ColumnProperty.Comparator.has">
<tt class="descname">has</tt><big>(</big><em>criterion=None</em>, <em>**kwargs</em><big>)</big><a class="headerlink" href="#sqlalchemy.orm.properties.ColumnProperty.Comparator.has" title="Permalink to this definition">¶</a></dt>
<dd><div class="inherited-member container">
<em>inherited from the</em> <a class="reference internal" href="#sqlalchemy.orm.interfaces.PropComparator.has" title="sqlalchemy.orm.interfaces.PropComparator.has"><tt class="xref py py-meth docutils literal"><span class="pre">has()</span></tt></a> <em>method of</em> <a class="reference internal" href="#sqlalchemy.orm.interfaces.PropComparator" title="sqlalchemy.orm.interfaces.PropComparator"><tt class="xref py py-class docutils literal"><span class="pre">PropComparator</span></tt></a></div>
<p>Return true if this element references a member which meets the
given criterion.</p>
<p>The usual implementation of <tt class="docutils literal"><span class="pre">has()</span></tt> is
<a class="reference internal" href="#sqlalchemy.orm.properties.RelationshipProperty.Comparator.has" title="sqlalchemy.orm.properties.RelationshipProperty.Comparator.has"><tt class="xref py py-meth docutils literal"><span class="pre">RelationshipProperty.Comparator.has()</span></tt></a>.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
<li><strong>criterion</strong> &#8211; an optional ClauseElement formulated against the
member class&#8217; table or attributes.</li>
<li><strong>**kwargs</strong> &#8211; key/value pairs corresponding to member class
attribute names which will be compared via equality to the
corresponding values.</li>
</ul>
</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="sqlalchemy.orm.properties.ColumnProperty.Comparator.ilike">
<tt class="descname">ilike</tt><big>(</big><em>other</em>, <em>escape=None</em><big>)</big><a class="headerlink" href="#sqlalchemy.orm.properties.ColumnProperty.Comparator.ilike" title="Permalink to this definition">¶</a></dt>
<dd><div class="inherited-member container">
<em>inherited from the</em> <a class="reference internal" href="../core/expression_api.html#sqlalchemy.sql.operators.ColumnOperators.ilike" title="sqlalchemy.sql.operators.ColumnOperators.ilike"><tt class="xref py py-meth docutils literal"><span class="pre">ilike()</span></tt></a> <em>method of</em> <a class="reference internal" href="../core/expression_api.html#sqlalchemy.sql.operators.ColumnOperators" title="sqlalchemy.sql.operators.ColumnOperators"><tt class="xref py py-class docutils literal"><span class="pre">ColumnOperators</span></tt></a></div>
<p>Implement the <tt class="docutils literal"><span class="pre">ilike</span></tt> operator.</p>
<p>In a column context, produces the clause <tt class="docutils literal"><span class="pre">a</span> <span class="pre">ILIKE</span> <span class="pre">other</span></tt>.</p>
<p>E.g.:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="n">select</span><span class="p">([</span><span class="n">sometable</span><span class="p">])</span><span class="o">.</span><span class="n">where</span><span class="p">(</span><span class="n">sometable</span><span class="o">.</span><span class="n">c</span><span class="o">.</span><span class="n">column</span><span class="o">.</span><span class="n">ilike</span><span class="p">(</span><span class="s">&quot;</span><span class="si">%f</span><span class="s">oobar%&quot;</span><span class="p">))</span></pre></div>
</div>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
<li><strong>other</strong> &#8211; expression to be compared</li>
<li><strong>escape</strong> &#8211; <p>optional escape character, renders the <tt class="docutils literal"><span class="pre">ESCAPE</span></tt>
keyword, e.g.:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="n">somecolumn</span><span class="o">.</span><span class="n">ilike</span><span class="p">(</span><span class="s">&quot;foo/%bar&quot;</span><span class="p">,</span> <span class="n">escape</span><span class="o">=</span><span class="s">&quot;/&quot;</span><span class="p">)</span></pre></div>
</div>
</li>
</ul>
</td>
</tr>
</tbody>
</table>
<div class="admonition-see-also admonition seealso">
<p class="first admonition-title">See also</p>
<p class="last"><a class="reference internal" href="../core/expression_api.html#sqlalchemy.sql.operators.ColumnOperators.like" title="sqlalchemy.sql.operators.ColumnOperators.like"><tt class="xref py py-meth docutils literal"><span class="pre">ColumnOperators.like()</span></tt></a></p>
</div>
</dd></dl>

<dl class="method">
<dt id="sqlalchemy.orm.properties.ColumnProperty.Comparator.in_">
<tt class="descname">in_</tt><big>(</big><em>other</em><big>)</big><a class="headerlink" href="#sqlalchemy.orm.properties.ColumnProperty.Comparator.in_" title="Permalink to this definition">¶</a></dt>
<dd><div class="inherited-member container">
<em>inherited from the</em> <a class="reference internal" href="../core/expression_api.html#sqlalchemy.sql.operators.ColumnOperators.in_" title="sqlalchemy.sql.operators.ColumnOperators.in_"><tt class="xref py py-meth docutils literal"><span class="pre">in_()</span></tt></a> <em>method of</em> <a class="reference internal" href="../core/expression_api.html#sqlalchemy.sql.operators.ColumnOperators" title="sqlalchemy.sql.operators.ColumnOperators"><tt class="xref py py-class docutils literal"><span class="pre">ColumnOperators</span></tt></a></div>
<p>Implement the <tt class="docutils literal"><span class="pre">in</span></tt> operator.</p>
<p>In a column context, produces the clause <tt class="docutils literal"><span class="pre">a</span> <span class="pre">IN</span> <span class="pre">other</span></tt>.
&#8220;other&#8221; may be a tuple/list of column expressions,
or a <a class="reference internal" href="../core/expression_api.html#sqlalchemy.sql.expression.select" title="sqlalchemy.sql.expression.select"><tt class="xref py py-func docutils literal"><span class="pre">select()</span></tt></a> construct.</p>
</dd></dl>

<dl class="method">
<dt id="sqlalchemy.orm.properties.ColumnProperty.Comparator.is_">
<tt class="descname">is_</tt><big>(</big><em>other</em><big>)</big><a class="headerlink" href="#sqlalchemy.orm.properties.ColumnProperty.Comparator.is_" title="Permalink to this definition">¶</a></dt>
<dd><div class="inherited-member container">
<em>inherited from the</em> <a class="reference internal" href="../core/expression_api.html#sqlalchemy.sql.operators.ColumnOperators.is_" title="sqlalchemy.sql.operators.ColumnOperators.is_"><tt class="xref py py-meth docutils literal"><span class="pre">is_()</span></tt></a> <em>method of</em> <a class="reference internal" href="../core/expression_api.html#sqlalchemy.sql.operators.ColumnOperators" title="sqlalchemy.sql.operators.ColumnOperators"><tt class="xref py py-class docutils literal"><span class="pre">ColumnOperators</span></tt></a></div>
<p>Implement the <tt class="docutils literal"><span class="pre">IS</span></tt> operator.</p>
<p>Normally, <tt class="docutils literal"><span class="pre">IS</span></tt> is generated automatically when comparing to a
value of <tt class="docutils literal"><span class="pre">None</span></tt>, which resolves to <tt class="docutils literal"><span class="pre">NULL</span></tt>.  However, explicit
usage of <tt class="docutils literal"><span class="pre">IS</span></tt> may be desirable if comparing to boolean values
on certain platforms.</p>
<p class="versionadded">
<span class="versionmodified">New in version 0.7.9.</span></p>
<div class="admonition-see-also admonition seealso">
<p class="first admonition-title">See also</p>
<p class="last"><a class="reference internal" href="../core/expression_api.html#sqlalchemy.sql.operators.ColumnOperators.isnot" title="sqlalchemy.sql.operators.ColumnOperators.isnot"><tt class="xref py py-meth docutils literal"><span class="pre">ColumnOperators.isnot()</span></tt></a></p>
</div>
</dd></dl>

<dl class="method">
<dt id="sqlalchemy.orm.properties.ColumnProperty.Comparator.isnot">
<tt class="descname">isnot</tt><big>(</big><em>other</em><big>)</big><a class="headerlink" href="#sqlalchemy.orm.properties.ColumnProperty.Comparator.isnot" title="Permalink to this definition">¶</a></dt>
<dd><div class="inherited-member container">
<em>inherited from the</em> <a class="reference internal" href="../core/expression_api.html#sqlalchemy.sql.operators.ColumnOperators.isnot" title="sqlalchemy.sql.operators.ColumnOperators.isnot"><tt class="xref py py-meth docutils literal"><span class="pre">isnot()</span></tt></a> <em>method of</em> <a class="reference internal" href="../core/expression_api.html#sqlalchemy.sql.operators.ColumnOperators" title="sqlalchemy.sql.operators.ColumnOperators"><tt class="xref py py-class docutils literal"><span class="pre">ColumnOperators</span></tt></a></div>
<p>Implement the <tt class="docutils literal"><span class="pre">IS</span> <span class="pre">NOT</span></tt> operator.</p>
<p>Normally, <tt class="docutils literal"><span class="pre">IS</span> <span class="pre">NOT</span></tt> is generated automatically when comparing to a
value of <tt class="docutils literal"><span class="pre">None</span></tt>, which resolves to <tt class="docutils literal"><span class="pre">NULL</span></tt>.  However, explicit
usage of <tt class="docutils literal"><span class="pre">IS</span> <span class="pre">NOT</span></tt> may be desirable if comparing to boolean values
on certain platforms.</p>
<p class="versionadded">
<span class="versionmodified">New in version 0.7.9.</span></p>
<div class="admonition-see-also admonition seealso">
<p class="first admonition-title">See also</p>
<p class="last"><a class="reference internal" href="../core/expression_api.html#sqlalchemy.sql.operators.ColumnOperators.is_" title="sqlalchemy.sql.operators.ColumnOperators.is_"><tt class="xref py py-meth docutils literal"><span class="pre">ColumnOperators.is_()</span></tt></a></p>
</div>
</dd></dl>

<dl class="method">
<dt id="sqlalchemy.orm.properties.ColumnProperty.Comparator.like">
<tt class="descname">like</tt><big>(</big><em>other</em>, <em>escape=None</em><big>)</big><a class="headerlink" href="#sqlalchemy.orm.properties.ColumnProperty.Comparator.like" title="Permalink to this definition">¶</a></dt>
<dd><div class="inherited-member container">
<em>inherited from the</em> <a class="reference internal" href="../core/expression_api.html#sqlalchemy.sql.operators.ColumnOperators.like" title="sqlalchemy.sql.operators.ColumnOperators.like"><tt class="xref py py-meth docutils literal"><span class="pre">like()</span></tt></a> <em>method of</em> <a class="reference internal" href="../core/expression_api.html#sqlalchemy.sql.operators.ColumnOperators" title="sqlalchemy.sql.operators.ColumnOperators"><tt class="xref py py-class docutils literal"><span class="pre">ColumnOperators</span></tt></a></div>
<p>Implement the <tt class="docutils literal"><span class="pre">like</span></tt> operator.</p>
<p>In a column context, produces the clause <tt class="docutils literal"><span class="pre">a</span> <span class="pre">LIKE</span> <span class="pre">other</span></tt>.</p>
<p>E.g.:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="n">select</span><span class="p">([</span><span class="n">sometable</span><span class="p">])</span><span class="o">.</span><span class="n">where</span><span class="p">(</span><span class="n">sometable</span><span class="o">.</span><span class="n">c</span><span class="o">.</span><span class="n">column</span><span class="o">.</span><span class="n">like</span><span class="p">(</span><span class="s">&quot;</span><span class="si">%f</span><span class="s">oobar%&quot;</span><span class="p">))</span></pre></div>
</div>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
<li><strong>other</strong> &#8211; expression to be compared</li>
<li><strong>escape</strong> &#8211; <p>optional escape character, renders the <tt class="docutils literal"><span class="pre">ESCAPE</span></tt>
keyword, e.g.:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="n">somecolumn</span><span class="o">.</span><span class="n">like</span><span class="p">(</span><span class="s">&quot;foo/%bar&quot;</span><span class="p">,</span> <span class="n">escape</span><span class="o">=</span><span class="s">&quot;/&quot;</span><span class="p">)</span></pre></div>
</div>
</li>
</ul>
</td>
</tr>
</tbody>
</table>
<div class="admonition-see-also admonition seealso">
<p class="first admonition-title">See also</p>
<p class="last"><a class="reference internal" href="../core/expression_api.html#sqlalchemy.sql.operators.ColumnOperators.ilike" title="sqlalchemy.sql.operators.ColumnOperators.ilike"><tt class="xref py py-meth docutils literal"><span class="pre">ColumnOperators.ilike()</span></tt></a></p>
</div>
</dd></dl>

<dl class="method">
<dt id="sqlalchemy.orm.properties.ColumnProperty.Comparator.match">
<tt class="descname">match</tt><big>(</big><em>other</em>, <em>**kwargs</em><big>)</big><a class="headerlink" href="#sqlalchemy.orm.properties.ColumnProperty.Comparator.match" title="Permalink to this definition">¶</a></dt>
<dd><div class="inherited-member container">
<em>inherited from the</em> <a class="reference internal" href="../core/expression_api.html#sqlalchemy.sql.operators.ColumnOperators.match" title="sqlalchemy.sql.operators.ColumnOperators.match"><tt class="xref py py-meth docutils literal"><span class="pre">match()</span></tt></a> <em>method of</em> <a class="reference internal" href="../core/expression_api.html#sqlalchemy.sql.operators.ColumnOperators" title="sqlalchemy.sql.operators.ColumnOperators"><tt class="xref py py-class docutils literal"><span class="pre">ColumnOperators</span></tt></a></div>
<p>Implements the &#8216;match&#8217; operator.</p>
<p>In a column context, this produces a MATCH clause, i.e.
<tt class="docutils literal"><span class="pre">MATCH</span> <span class="pre">'&lt;other&gt;'</span></tt>.  The allowed contents of <tt class="docutils literal"><span class="pre">other</span></tt>
are database backend specific.</p>
</dd></dl>

<dl class="method">
<dt id="sqlalchemy.orm.properties.ColumnProperty.Comparator.notilike">
<tt class="descname">notilike</tt><big>(</big><em>other</em>, <em>escape=None</em><big>)</big><a class="headerlink" href="#sqlalchemy.orm.properties.ColumnProperty.Comparator.notilike" title="Permalink to this definition">¶</a></dt>
<dd><div class="inherited-member container">
<em>inherited from the</em> <a class="reference internal" href="../core/expression_api.html#sqlalchemy.sql.operators.ColumnOperators.notilike" title="sqlalchemy.sql.operators.ColumnOperators.notilike"><tt class="xref py py-meth docutils literal"><span class="pre">notilike()</span></tt></a> <em>method of</em> <a class="reference internal" href="../core/expression_api.html#sqlalchemy.sql.operators.ColumnOperators" title="sqlalchemy.sql.operators.ColumnOperators"><tt class="xref py py-class docutils literal"><span class="pre">ColumnOperators</span></tt></a></div>
<p>implement the <tt class="docutils literal"><span class="pre">NOT</span> <span class="pre">ILIKE</span></tt> operator.</p>
<p>This is equivalent to using negation with
<a class="reference internal" href="../core/expression_api.html#sqlalchemy.sql.operators.ColumnOperators.ilike" title="sqlalchemy.sql.operators.ColumnOperators.ilike"><tt class="xref py py-meth docutils literal"><span class="pre">ColumnOperators.ilike()</span></tt></a>, i.e. <tt class="docutils literal"><span class="pre">~x.ilike(y)</span></tt>.</p>
<p class="versionadded">
<span class="versionmodified">New in version 0.8.</span></p>
<div class="admonition-see-also admonition seealso">
<p class="first admonition-title">See also</p>
<p class="last"><a class="reference internal" href="../core/expression_api.html#sqlalchemy.sql.operators.ColumnOperators.ilike" title="sqlalchemy.sql.operators.ColumnOperators.ilike"><tt class="xref py py-meth docutils literal"><span class="pre">ColumnOperators.ilike()</span></tt></a></p>
</div>
</dd></dl>

<dl class="method">
<dt id="sqlalchemy.orm.properties.ColumnProperty.Comparator.notin_">
<tt class="descname">notin_</tt><big>(</big><em>other</em><big>)</big><a class="headerlink" href="#sqlalchemy.orm.properties.ColumnProperty.Comparator.notin_" title="Permalink to this definition">¶</a></dt>
<dd><div class="inherited-member container">
<em>inherited from the</em> <a class="reference internal" href="../core/expression_api.html#sqlalchemy.sql.operators.ColumnOperators.notin_" title="sqlalchemy.sql.operators.ColumnOperators.notin_"><tt class="xref py py-meth docutils literal"><span class="pre">notin_()</span></tt></a> <em>method of</em> <a class="reference internal" href="../core/expression_api.html#sqlalchemy.sql.operators.ColumnOperators" title="sqlalchemy.sql.operators.ColumnOperators"><tt class="xref py py-class docutils literal"><span class="pre">ColumnOperators</span></tt></a></div>
<p>implement the <tt class="docutils literal"><span class="pre">NOT</span> <span class="pre">IN</span></tt> operator.</p>
<p>This is equivalent to using negation with <a class="reference internal" href="../core/expression_api.html#sqlalchemy.sql.operators.ColumnOperators.in_" title="sqlalchemy.sql.operators.ColumnOperators.in_"><tt class="xref py py-meth docutils literal"><span class="pre">ColumnOperators.in_()</span></tt></a>,
i.e. <tt class="docutils literal"><span class="pre">~x.in_(y)</span></tt>.</p>
<p class="versionadded">
<span class="versionmodified">New in version 0.8.</span></p>
<div class="admonition-see-also admonition seealso">
<p class="first admonition-title">See also</p>
<p class="last"><a class="reference internal" href="../core/expression_api.html#sqlalchemy.sql.operators.ColumnOperators.in_" title="sqlalchemy.sql.operators.ColumnOperators.in_"><tt class="xref py py-meth docutils literal"><span class="pre">ColumnOperators.in_()</span></tt></a></p>
</div>
</dd></dl>

<dl class="method">
<dt id="sqlalchemy.orm.properties.ColumnProperty.Comparator.notlike">
<tt class="descname">notlike</tt><big>(</big><em>other</em>, <em>escape=None</em><big>)</big><a class="headerlink" href="#sqlalchemy.orm.properties.ColumnProperty.Comparator.notlike" title="Permalink to this definition">¶</a></dt>
<dd><div class="inherited-member container">
<em>inherited from the</em> <a class="reference internal" href="../core/expression_api.html#sqlalchemy.sql.operators.ColumnOperators.notlike" title="sqlalchemy.sql.operators.ColumnOperators.notlike"><tt class="xref py py-meth docutils literal"><span class="pre">notlike()</span></tt></a> <em>method of</em> <a class="reference internal" href="../core/expression_api.html#sqlalchemy.sql.operators.ColumnOperators" title="sqlalchemy.sql.operators.ColumnOperators"><tt class="xref py py-class docutils literal"><span class="pre">ColumnOperators</span></tt></a></div>
<p>implement the <tt class="docutils literal"><span class="pre">NOT</span> <span class="pre">LIKE</span></tt> operator.</p>
<p>This is equivalent to using negation with
<a class="reference internal" href="../core/expression_api.html#sqlalchemy.sql.operators.ColumnOperators.like" title="sqlalchemy.sql.operators.ColumnOperators.like"><tt class="xref py py-meth docutils literal"><span class="pre">ColumnOperators.like()</span></tt></a>, i.e. <tt class="docutils literal"><span class="pre">~x.like(y)</span></tt>.</p>
<p class="versionadded">
<span class="versionmodified">New in version 0.8.</span></p>
<div class="admonition-see-also admonition seealso">
<p class="first admonition-title">See also</p>
<p class="last"><a class="reference internal" href="../core/expression_api.html#sqlalchemy.sql.operators.ColumnOperators.like" title="sqlalchemy.sql.operators.ColumnOperators.like"><tt class="xref py py-meth docutils literal"><span class="pre">ColumnOperators.like()</span></tt></a></p>
</div>
</dd></dl>

<dl class="method">
<dt id="sqlalchemy.orm.properties.ColumnProperty.Comparator.nullsfirst">
<tt class="descname">nullsfirst</tt><big>(</big><big>)</big><a class="headerlink" href="#sqlalchemy.orm.properties.ColumnProperty.Comparator.nullsfirst" title="Permalink to this definition">¶</a></dt>
<dd><div class="inherited-member container">
<em>inherited from the</em> <a class="reference internal" href="../core/expression_api.html#sqlalchemy.sql.operators.ColumnOperators.nullsfirst" title="sqlalchemy.sql.operators.ColumnOperators.nullsfirst"><tt class="xref py py-meth docutils literal"><span class="pre">nullsfirst()</span></tt></a> <em>method of</em> <a class="reference internal" href="../core/expression_api.html#sqlalchemy.sql.operators.ColumnOperators" title="sqlalchemy.sql.operators.ColumnOperators"><tt class="xref py py-class docutils literal"><span class="pre">ColumnOperators</span></tt></a></div>
<p>Produce a <a class="reference internal" href="../core/expression_api.html#sqlalchemy.sql.expression.nullsfirst" title="sqlalchemy.sql.expression.nullsfirst"><tt class="xref py py-func docutils literal"><span class="pre">nullsfirst()</span></tt></a> clause against the
parent object.</p>
</dd></dl>

<dl class="method">
<dt id="sqlalchemy.orm.properties.ColumnProperty.Comparator.nullslast">
<tt class="descname">nullslast</tt><big>(</big><big>)</big><a class="headerlink" href="#sqlalchemy.orm.properties.ColumnProperty.Comparator.nullslast" title="Permalink to this definition">¶</a></dt>
<dd><div class="inherited-member container">
<em>inherited from the</em> <a class="reference internal" href="../core/expression_api.html#sqlalchemy.sql.operators.ColumnOperators.nullslast" title="sqlalchemy.sql.operators.ColumnOperators.nullslast"><tt class="xref py py-meth docutils literal"><span class="pre">nullslast()</span></tt></a> <em>method of</em> <a class="reference internal" href="../core/expression_api.html#sqlalchemy.sql.operators.ColumnOperators" title="sqlalchemy.sql.operators.ColumnOperators"><tt class="xref py py-class docutils literal"><span class="pre">ColumnOperators</span></tt></a></div>
<p>Produce a <a class="reference internal" href="../core/expression_api.html#sqlalchemy.sql.expression.nullslast" title="sqlalchemy.sql.expression.nullslast"><tt class="xref py py-func docutils literal"><span class="pre">nullslast()</span></tt></a> clause against the
parent object.</p>
</dd></dl>

<dl class="method">
<dt id="sqlalchemy.orm.properties.ColumnProperty.Comparator.of_type">
<tt class="descname">of_type</tt><big>(</big><em>class_</em><big>)</big><a class="headerlink" href="#sqlalchemy.orm.properties.ColumnProperty.Comparator.of_type" title="Permalink to this definition">¶</a></dt>
<dd><div class="inherited-member container">
<em>inherited from the</em> <a class="reference internal" href="#sqlalchemy.orm.interfaces.PropComparator.of_type" title="sqlalchemy.orm.interfaces.PropComparator.of_type"><tt class="xref py py-meth docutils literal"><span class="pre">of_type()</span></tt></a> <em>method of</em> <a class="reference internal" href="#sqlalchemy.orm.interfaces.PropComparator" title="sqlalchemy.orm.interfaces.PropComparator"><tt class="xref py py-class docutils literal"><span class="pre">PropComparator</span></tt></a></div>
<p>Redefine this object in terms of a polymorphic subclass.</p>
<p>Returns a new PropComparator from which further criterion can be
evaluated.</p>
<p>e.g.:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="n">query</span><span class="o">.</span><span class="n">join</span><span class="p">(</span><span class="n">Company</span><span class="o">.</span><span class="n">employees</span><span class="o">.</span><span class="n">of_type</span><span class="p">(</span><span class="n">Engineer</span><span class="p">))</span><span class="o">.</span>\
   <span class="nb">filter</span><span class="p">(</span><span class="n">Engineer</span><span class="o">.</span><span class="n">name</span><span class="o">==</span><span class="s">&#39;foo&#39;</span><span class="p">)</span></pre></div>
</div>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>class_</strong> &#8211; a class or mapper indicating that criterion will be
against this specific subclass.</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="sqlalchemy.orm.properties.ColumnProperty.Comparator.op">
<tt class="descname">op</tt><big>(</big><em>opstring</em>, <em>precedence=0</em><big>)</big><a class="headerlink" href="#sqlalchemy.orm.properties.ColumnProperty.Comparator.op" title="Permalink to this definition">¶</a></dt>
<dd><div class="inherited-member container">
<em>inherited from the</em> <a class="reference internal" href="../core/expression_api.html#sqlalchemy.sql.operators.Operators.op" title="sqlalchemy.sql.operators.Operators.op"><tt class="xref py py-meth docutils literal"><span class="pre">op()</span></tt></a> <em>method of</em> <a class="reference internal" href="../core/expression_api.html#sqlalchemy.sql.operators.Operators" title="sqlalchemy.sql.operators.Operators"><tt class="xref py py-class docutils literal"><span class="pre">Operators</span></tt></a></div>
<p>produce a generic operator function.</p>
<p>e.g.:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="n">somecolumn</span><span class="o">.</span><span class="n">op</span><span class="p">(</span><span class="s">&quot;*&quot;</span><span class="p">)(</span><span class="mi">5</span><span class="p">)</span></pre></div>
</div>
<p>produces:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="n">somecolumn</span> <span class="o">*</span> <span class="mi">5</span></pre></div>
</div>
<p>This function can also be used to make bitwise operators explicit. For
example:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="n">somecolumn</span><span class="o">.</span><span class="n">op</span><span class="p">(</span><span class="s">&#39;&amp;&#39;</span><span class="p">)(</span><span class="mh">0xff</span><span class="p">)</span></pre></div>
</div>
<p>is a bitwise AND of the value in <tt class="docutils literal"><span class="pre">somecolumn</span></tt>.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
<li><strong>operator</strong> &#8211; a string which will be output as the infix operator
between this element and the expression passed to the
generated function.</li>
<li><strong>precedence</strong> &#8211; <p>precedence to apply to the operator, when
parenthesizing expressions.  A lower number will cause the expression
to be parenthesized when applied against another operator with
higher precedence.  The default value of <tt class="docutils literal"><span class="pre">0</span></tt> is lower than all
operators except for the comma (<tt class="docutils literal"><span class="pre">,</span></tt>) and <tt class="docutils literal"><span class="pre">AS</span></tt> operators.
A value of 100 will be higher or equal to all operators, and -100
will be lower than or equal to all operators.</p>
<p class="versionadded">
<span class="versionmodified">New in version 0.8: </span>- added the &#8216;precedence&#8217; argument.</p>
</li>
</ul>
</td>
</tr>
</tbody>
</table>
<div class="admonition-see-also admonition seealso">
<p class="first admonition-title">See also</p>
<p class="last"><a class="reference internal" href="../core/types.html#types-operators"><em>Redefining and Creating New Operators</em></a></p>
</div>
</dd></dl>

<dl class="method">
<dt id="sqlalchemy.orm.properties.ColumnProperty.Comparator.startswith">
<tt class="descname">startswith</tt><big>(</big><em>other</em>, <em>**kwargs</em><big>)</big><a class="headerlink" href="#sqlalchemy.orm.properties.ColumnProperty.Comparator.startswith" title="Permalink to this definition">¶</a></dt>
<dd><div class="inherited-member container">
<em>inherited from the</em> <a class="reference internal" href="../core/expression_api.html#sqlalchemy.sql.operators.ColumnOperators.startswith" title="sqlalchemy.sql.operators.ColumnOperators.startswith"><tt class="xref py py-meth docutils literal"><span class="pre">startswith()</span></tt></a> <em>method of</em> <a class="reference internal" href="../core/expression_api.html#sqlalchemy.sql.operators.ColumnOperators" title="sqlalchemy.sql.operators.ColumnOperators"><tt class="xref py py-class docutils literal"><span class="pre">ColumnOperators</span></tt></a></div>
<p>Implement the <tt class="docutils literal"><span class="pre">startwith</span></tt> operator.</p>
<p>In a column context, produces the clause <tt class="docutils literal"><span class="pre">LIKE</span> <span class="pre">'&lt;other&gt;%'</span></tt></p>
</dd></dl>

</dd></dl>

<dl class="method">
<dt id="sqlalchemy.orm.properties.ColumnProperty.__init__">
<tt class="descclassname">ColumnProperty.</tt><tt class="descname">__init__</tt><big>(</big><em>*columns</em>, <em>**kwargs</em><big>)</big><a class="headerlink" href="#sqlalchemy.orm.properties.ColumnProperty.__init__" title="Permalink to this definition">¶</a></dt>
<dd><p>Construct a ColumnProperty.</p>
<p>Note the public constructor is the <a class="reference internal" href="mapper_config.html#sqlalchemy.orm.column_property" title="sqlalchemy.orm.column_property"><tt class="xref py py-func docutils literal"><span class="pre">orm.column_property()</span></tt></a>
function.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
<li><strong>*columns</strong> &#8211; The list of <cite>columns</cite> describes a single
object property. If there are multiple tables joined
together for the mapper, this list represents the equivalent
column as it appears across each table.</li>
<li><strong>group</strong> &#8211; </li>
<li><strong>deferred</strong> &#8211; </li>
<li><strong>comparator_factory</strong> &#8211; </li>
<li><strong>descriptor</strong> &#8211; </li>
<li><strong>expire_on_flush</strong> &#8211; </li>
<li><strong>extension</strong> &#8211; </li>
<li><strong>info</strong> &#8211; Optional data dictionary which will be populated into the
<a class="reference internal" href="../core/schema.html#sqlalchemy.schema.Column.info" title="sqlalchemy.schema.Column.info"><tt class="xref py py-attr docutils literal"><span class="pre">info</span></tt></a> attribute of this object.</li>
</ul>
</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="sqlalchemy.orm.properties.ColumnProperty.cascade_iterator">
<tt class="descclassname">ColumnProperty.</tt><tt class="descname">cascade_iterator</tt><big>(</big><em>type_</em>, <em>state</em>, <em>visited_instances=None</em>, <em>halt_on=None</em><big>)</big><a class="headerlink" href="#sqlalchemy.orm.properties.ColumnProperty.cascade_iterator" title="Permalink to this definition">¶</a></dt>
<dd><div class="inherited-member container">
<em>inherited from the</em> <a class="reference internal" href="#sqlalchemy.orm.interfaces.MapperProperty.cascade_iterator" title="sqlalchemy.orm.interfaces.MapperProperty.cascade_iterator"><tt class="xref py py-meth docutils literal"><span class="pre">cascade_iterator()</span></tt></a> <em>method of</em> <a class="reference internal" href="#sqlalchemy.orm.interfaces.MapperProperty" title="sqlalchemy.orm.interfaces.MapperProperty"><tt class="xref py py-class docutils literal"><span class="pre">MapperProperty</span></tt></a></div>
<p>Iterate through instances related to the given instance for
a particular &#8216;cascade&#8217;, starting with this MapperProperty.</p>
<p>Return an iterator3-tuples (instance, mapper, state).</p>
<p>Note that the &#8216;cascade&#8217; collection on this MapperProperty is
checked first for the given type before cascade_iterator is called.</p>
<p>See PropertyLoader for the related instance implementation.</p>
</dd></dl>

<dl class="attribute">
<dt id="sqlalchemy.orm.properties.ColumnProperty.class_attribute">
<tt class="descclassname">ColumnProperty.</tt><tt class="descname">class_attribute</tt><a class="headerlink" href="#sqlalchemy.orm.properties.ColumnProperty.class_attribute" title="Permalink to this definition">¶</a></dt>
<dd><div class="inherited-member container">
<em>inherited from the</em> <a class="reference internal" href="#sqlalchemy.orm.interfaces.MapperProperty.class_attribute" title="sqlalchemy.orm.interfaces.MapperProperty.class_attribute"><tt class="xref py py-attr docutils literal"><span class="pre">class_attribute</span></tt></a> <em>attribute of</em> <a class="reference internal" href="#sqlalchemy.orm.interfaces.MapperProperty" title="sqlalchemy.orm.interfaces.MapperProperty"><tt class="xref py py-class docutils literal"><span class="pre">MapperProperty</span></tt></a></div>
<p>Return the class-bound descriptor corresponding to this
MapperProperty.</p>
</dd></dl>

<dl class="method">
<dt id="sqlalchemy.orm.properties.ColumnProperty.compare">
<tt class="descclassname">ColumnProperty.</tt><tt class="descname">compare</tt><big>(</big><em>operator</em>, <em>value</em>, <em>**kw</em><big>)</big><a class="headerlink" href="#sqlalchemy.orm.properties.ColumnProperty.compare" title="Permalink to this definition">¶</a></dt>
<dd><div class="inherited-member container">
<em>inherited from the</em> <a class="reference internal" href="#sqlalchemy.orm.interfaces.MapperProperty.compare" title="sqlalchemy.orm.interfaces.MapperProperty.compare"><tt class="xref py py-meth docutils literal"><span class="pre">compare()</span></tt></a> <em>method of</em> <a class="reference internal" href="#sqlalchemy.orm.interfaces.MapperProperty" title="sqlalchemy.orm.interfaces.MapperProperty"><tt class="xref py py-class docutils literal"><span class="pre">MapperProperty</span></tt></a></div>
<p>Return a compare operation for the columns represented by
this <tt class="docutils literal"><span class="pre">MapperProperty</span></tt> to the given value, which may be a
column value or an instance.  &#8216;operator&#8217; is an operator from
the operators module, or from sql.Comparator.</p>
<p>By default uses the PropComparator attached to this MapperProperty
under the attribute name &#8220;comparator&#8221;.</p>
</dd></dl>

<dl class="attribute">
<dt id="sqlalchemy.orm.properties.ColumnProperty.expression">
<tt class="descclassname">ColumnProperty.</tt><tt class="descname">expression</tt><a class="headerlink" href="#sqlalchemy.orm.properties.ColumnProperty.expression" title="Permalink to this definition">¶</a></dt>
<dd><p>Return the primary column or expression for this ColumnProperty.</p>
</dd></dl>

<dl class="attribute">
<dt id="sqlalchemy.orm.properties.ColumnProperty.info">
<tt class="descclassname">ColumnProperty.</tt><tt class="descname">info</tt><a class="headerlink" href="#sqlalchemy.orm.properties.ColumnProperty.info" title="Permalink to this definition">¶</a></dt>
<dd><div class="inherited-member container">
<em>inherited from the</em> <a class="reference internal" href="#sqlalchemy.orm.interfaces.MapperProperty.info" title="sqlalchemy.orm.interfaces.MapperProperty.info"><tt class="xref py py-attr docutils literal"><span class="pre">info</span></tt></a> <em>attribute of</em> <a class="reference internal" href="#sqlalchemy.orm.interfaces.MapperProperty" title="sqlalchemy.orm.interfaces.MapperProperty"><tt class="xref py py-class docutils literal"><span class="pre">MapperProperty</span></tt></a></div>
<p>Info dictionary associated with the object, allowing user-defined
data to be associated with this <a class="reference internal" href="#sqlalchemy.orm.interfaces.MapperProperty" title="sqlalchemy.orm.interfaces.MapperProperty"><tt class="xref py py-class docutils literal"><span class="pre">MapperProperty</span></tt></a>.</p>
<p>The dictionary is generated when first accessed.  Alternatively,
it can be specified as a constructor argument to the
<a class="reference internal" href="mapper_config.html#sqlalchemy.orm.column_property" title="sqlalchemy.orm.column_property"><tt class="xref py py-func docutils literal"><span class="pre">column_property()</span></tt></a>, <a class="reference internal" href="relationships.html#sqlalchemy.orm.relationship" title="sqlalchemy.orm.relationship"><tt class="xref py py-func docutils literal"><span class="pre">relationship()</span></tt></a>, or <a class="reference internal" href="mapper_config.html#sqlalchemy.orm.composite" title="sqlalchemy.orm.composite"><tt class="xref py py-func docutils literal"><span class="pre">composite()</span></tt></a>
functions.</p>
<p class="versionadded">
<span class="versionmodified">New in version 0.8: </span>Added support for .info to all
<a class="reference internal" href="#sqlalchemy.orm.interfaces.MapperProperty" title="sqlalchemy.orm.interfaces.MapperProperty"><tt class="xref py py-class docutils literal"><span class="pre">MapperProperty</span></tt></a> subclasses.</p>
<div class="admonition-see-also admonition seealso">
<p class="first admonition-title">See also</p>
<p><a class="reference internal" href="#sqlalchemy.orm.attributes.QueryableAttribute.info" title="sqlalchemy.orm.attributes.QueryableAttribute.info"><tt class="xref py py-attr docutils literal"><span class="pre">QueryableAttribute.info</span></tt></a></p>
<p class="last"><a class="reference internal" href="../core/schema.html#sqlalchemy.schema.SchemaItem.info" title="sqlalchemy.schema.SchemaItem.info"><tt class="xref py py-attr docutils literal"><span class="pre">SchemaItem.info</span></tt></a></p>
</div>
</dd></dl>

<dl class="method">
<dt id="sqlalchemy.orm.properties.ColumnProperty.init">
<tt class="descclassname">ColumnProperty.</tt><tt class="descname">init</tt><big>(</big><big>)</big><a class="headerlink" href="#sqlalchemy.orm.properties.ColumnProperty.init" title="Permalink to this definition">¶</a></dt>
<dd><div class="inherited-member container">
<em>inherited from the</em> <a class="reference internal" href="#sqlalchemy.orm.interfaces.MapperProperty.init" title="sqlalchemy.orm.interfaces.MapperProperty.init"><tt class="xref py py-meth docutils literal"><span class="pre">init()</span></tt></a> <em>method of</em> <a class="reference internal" href="#sqlalchemy.orm.interfaces.MapperProperty" title="sqlalchemy.orm.interfaces.MapperProperty"><tt class="xref py py-class docutils literal"><span class="pre">MapperProperty</span></tt></a></div>
<p>Called after all mappers are created to assemble
relationships between mappers and perform other post-mapper-creation
initialization steps.</p>
</dd></dl>

<dl class="method">
<dt id="sqlalchemy.orm.properties.ColumnProperty.is_primary">
<tt class="descclassname">ColumnProperty.</tt><tt class="descname">is_primary</tt><big>(</big><big>)</big><a class="headerlink" href="#sqlalchemy.orm.properties.ColumnProperty.is_primary" title="Permalink to this definition">¶</a></dt>
<dd><div class="inherited-member container">
<em>inherited from the</em> <a class="reference internal" href="#sqlalchemy.orm.interfaces.MapperProperty.is_primary" title="sqlalchemy.orm.interfaces.MapperProperty.is_primary"><tt class="xref py py-meth docutils literal"><span class="pre">is_primary()</span></tt></a> <em>method of</em> <a class="reference internal" href="#sqlalchemy.orm.interfaces.MapperProperty" title="sqlalchemy.orm.interfaces.MapperProperty"><tt class="xref py py-class docutils literal"><span class="pre">MapperProperty</span></tt></a></div>
<p>Return True if this <tt class="docutils literal"><span class="pre">MapperProperty</span></tt>&#8216;s mapper is the
primary mapper for its class.</p>
<p>This flag is used to indicate that the <tt class="docutils literal"><span class="pre">MapperProperty</span></tt> can
define attribute instrumentation for the class at the class
level (as opposed to the individual instance level).</p>
</dd></dl>

</dd></dl>

<dl class="class">
<dt id="sqlalchemy.orm.descriptor_props.CompositeProperty">
<em class="property">class </em><tt class="descclassname">sqlalchemy.orm.descriptor_props.</tt><tt class="descname">CompositeProperty</tt><big>(</big><em>class_</em>, <em>*attrs</em>, <em>**kwargs</em><big>)</big><a class="headerlink" href="#sqlalchemy.orm.descriptor_props.CompositeProperty" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <tt class="xref py py-class docutils literal"><span class="pre">sqlalchemy.orm.descriptor_props.DescriptorProperty</span></tt></p>
<p>Defines a &#8220;composite&#8221; mapped attribute, representing a collection
of columns as one attribute.</p>
<p><a class="reference internal" href="#sqlalchemy.orm.descriptor_props.CompositeProperty" title="sqlalchemy.orm.descriptor_props.CompositeProperty"><tt class="xref py py-class docutils literal"><span class="pre">CompositeProperty</span></tt></a> is constructed using the <a class="reference internal" href="mapper_config.html#sqlalchemy.orm.composite" title="sqlalchemy.orm.composite"><tt class="xref py py-func docutils literal"><span class="pre">composite()</span></tt></a>
function.</p>
<p>See also:</p>
<p><a class="reference internal" href="mapper_config.html#mapper-composite"><em>Composite Column Types</em></a></p>
<dl class="class">
<dt id="sqlalchemy.orm.descriptor_props.CompositeProperty.Comparator">
<em class="property">class </em><tt class="descname">Comparator</tt><big>(</big><em>prop</em>, <em>parentmapper</em>, <em>adapter=None</em><big>)</big><a class="headerlink" href="#sqlalchemy.orm.descriptor_props.CompositeProperty.Comparator" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#sqlalchemy.orm.interfaces.PropComparator" title="sqlalchemy.orm.interfaces.PropComparator"><tt class="xref py py-class docutils literal"><span class="pre">sqlalchemy.orm.interfaces.PropComparator</span></tt></a></p>
<p>Produce boolean, comparison, and other operators for
<a class="reference internal" href="#sqlalchemy.orm.descriptor_props.CompositeProperty" title="sqlalchemy.orm.descriptor_props.CompositeProperty"><tt class="xref py py-class docutils literal"><span class="pre">CompositeProperty</span></tt></a> attributes.</p>
<p>See the example in <a class="reference internal" href="mapper_config.html#composite-operations"><em>Redefining Comparison Operations for Composites</em></a> for an overview
of usage , as well as the documentation for <a class="reference internal" href="#sqlalchemy.orm.interfaces.PropComparator" title="sqlalchemy.orm.interfaces.PropComparator"><tt class="xref py py-class docutils literal"><span class="pre">PropComparator</span></tt></a>.</p>
<p>See also:</p>
<p><a class="reference internal" href="#sqlalchemy.orm.interfaces.PropComparator" title="sqlalchemy.orm.interfaces.PropComparator"><tt class="xref py py-class docutils literal"><span class="pre">PropComparator</span></tt></a></p>
<p><a class="reference internal" href="../core/expression_api.html#sqlalchemy.sql.operators.ColumnOperators" title="sqlalchemy.sql.operators.ColumnOperators"><tt class="xref py py-class docutils literal"><span class="pre">ColumnOperators</span></tt></a></p>
<p><a class="reference internal" href="../core/types.html#types-operators"><em>Redefining and Creating New Operators</em></a></p>
<p><a class="reference internal" href="../core/types.html#sqlalchemy.types.TypeEngine.comparator_factory" title="sqlalchemy.types.TypeEngine.comparator_factory"><tt class="xref py py-attr docutils literal"><span class="pre">TypeEngine.comparator_factory</span></tt></a></p>
</dd></dl>

<dl class="method">
<dt id="sqlalchemy.orm.descriptor_props.CompositeProperty.do_init">
<tt class="descclassname">CompositeProperty.</tt><tt class="descname">do_init</tt><big>(</big><big>)</big><a class="headerlink" href="#sqlalchemy.orm.descriptor_props.CompositeProperty.do_init" title="Permalink to this definition">¶</a></dt>
<dd><p>Initialization which occurs after the <a class="reference internal" href="#sqlalchemy.orm.descriptor_props.CompositeProperty" title="sqlalchemy.orm.descriptor_props.CompositeProperty"><tt class="xref py py-class docutils literal"><span class="pre">CompositeProperty</span></tt></a>
has been associated with its parent mapper.</p>
</dd></dl>

<dl class="method">
<dt id="sqlalchemy.orm.descriptor_props.CompositeProperty.get_history">
<tt class="descclassname">CompositeProperty.</tt><tt class="descname">get_history</tt><big>(</big><em>state</em>, <em>dict_</em>, <em>passive=&lt;symbol 'PASSIVE_OFF&gt;</em><big>)</big><a class="headerlink" href="#sqlalchemy.orm.descriptor_props.CompositeProperty.get_history" title="Permalink to this definition">¶</a></dt>
<dd><p>Provided for userland code that uses attributes.get_history().</p>
</dd></dl>

</dd></dl>

<dl class="class">
<dt id="sqlalchemy.orm.interfaces._InspectionAttr">
<em class="property">class </em><tt class="descclassname">sqlalchemy.orm.interfaces.</tt><tt class="descname">_InspectionAttr</tt><a class="headerlink" href="#sqlalchemy.orm.interfaces._InspectionAttr" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <tt class="xref py py-class docutils literal"><span class="pre">object</span></tt></p>
<p>A base class applied to all ORM objects that can be returned
by the <a class="reference internal" href="../core/inspection.html#sqlalchemy.inspection.inspect" title="sqlalchemy.inspection.inspect"><tt class="xref py py-func docutils literal"><span class="pre">inspect()</span></tt></a> function.</p>
<p>The attributes defined here allow the usage of simple boolean
checks to test basic facts about the object returned.</p>
<p>While the boolean checks here are basically the same as using
the Python isinstance() function, the flags here can be used without
the need to import all of these classes, and also such that
the SQLAlchemy class system can change while leaving the flags
here intact for forwards-compatibility.</p>
<dl class="attribute">
<dt id="sqlalchemy.orm.interfaces._InspectionAttr.extension_type">
<tt class="descname">extension_type</tt><em class="property"> = &lt;symbol 'NOT_EXTENSION&gt;</em><a class="headerlink" href="#sqlalchemy.orm.interfaces._InspectionAttr.extension_type" title="Permalink to this definition">¶</a></dt>
<dd><p>The extension type, if any.
Defaults to <a class="reference internal" href="#sqlalchemy.orm.interfaces.NOT_EXTENSION" title="sqlalchemy.orm.interfaces.NOT_EXTENSION"><tt class="xref py py-data docutils literal"><span class="pre">interfaces.NOT_EXTENSION</span></tt></a></p>
<p class="versionadded">
<span class="versionmodified">New in version 0.8.0.</span></p>
<div class="admonition-see-also admonition seealso">
<p class="first admonition-title">See also</p>
<p><a class="reference internal" href="extensions/hybrid.html#sqlalchemy.ext.hybrid.HYBRID_METHOD" title="sqlalchemy.ext.hybrid.HYBRID_METHOD"><tt class="xref py py-data docutils literal"><span class="pre">HYBRID_METHOD</span></tt></a></p>
<p><a class="reference internal" href="extensions/hybrid.html#sqlalchemy.ext.hybrid.HYBRID_PROPERTY" title="sqlalchemy.ext.hybrid.HYBRID_PROPERTY"><tt class="xref py py-data docutils literal"><span class="pre">HYBRID_PROPERTY</span></tt></a></p>
<p class="last"><a class="reference internal" href="extensions/associationproxy.html#sqlalchemy.ext.associationproxy.ASSOCIATION_PROXY" title="sqlalchemy.ext.associationproxy.ASSOCIATION_PROXY"><tt class="xref py py-data docutils literal"><span class="pre">ASSOCIATION_PROXY</span></tt></a></p>
</div>
</dd></dl>

<dl class="attribute">
<dt id="sqlalchemy.orm.interfaces._InspectionAttr.is_aliased_class">
<tt class="descname">is_aliased_class</tt><em class="property"> = False</em><a class="headerlink" href="#sqlalchemy.orm.interfaces._InspectionAttr.is_aliased_class" title="Permalink to this definition">¶</a></dt>
<dd><p>True if this object is an instance of <a class="reference internal" href="query.html#sqlalchemy.orm.util.AliasedClass" title="sqlalchemy.orm.util.AliasedClass"><tt class="xref py py-class docutils literal"><span class="pre">AliasedClass</span></tt></a>.</p>
</dd></dl>

<dl class="attribute">
<dt id="sqlalchemy.orm.interfaces._InspectionAttr.is_attribute">
<tt class="descname">is_attribute</tt><em class="property"> = False</em><a class="headerlink" href="#sqlalchemy.orm.interfaces._InspectionAttr.is_attribute" title="Permalink to this definition">¶</a></dt>
<dd><p>True if this object is a Python <a class="reference internal" href="../glossary.html#term-descriptor"><em class="xref std std-term">descriptor</em></a>.</p>
<p>This can refer to one of many types.   Usually a
<a class="reference internal" href="#sqlalchemy.orm.attributes.QueryableAttribute" title="sqlalchemy.orm.attributes.QueryableAttribute"><tt class="xref py py-class docutils literal"><span class="pre">QueryableAttribute</span></tt></a> which handles attributes events on behalf
of a <a class="reference internal" href="#sqlalchemy.orm.interfaces.MapperProperty" title="sqlalchemy.orm.interfaces.MapperProperty"><tt class="xref py py-class docutils literal"><span class="pre">MapperProperty</span></tt></a>.   But can also be an extension type
such as <a class="reference internal" href="extensions/associationproxy.html#sqlalchemy.ext.associationproxy.AssociationProxy" title="sqlalchemy.ext.associationproxy.AssociationProxy"><tt class="xref py py-class docutils literal"><span class="pre">AssociationProxy</span></tt></a> or <a class="reference internal" href="extensions/hybrid.html#sqlalchemy.ext.hybrid.hybrid_property" title="sqlalchemy.ext.hybrid.hybrid_property"><tt class="xref py py-class docutils literal"><span class="pre">hybrid_property</span></tt></a>.
The <a class="reference internal" href="#sqlalchemy.orm.interfaces._InspectionAttr.extension_type" title="sqlalchemy.orm.interfaces._InspectionAttr.extension_type"><tt class="xref py py-attr docutils literal"><span class="pre">_InspectionAttr.extension_type</span></tt></a> will refer to a constant
identifying the specific subtype.</p>
<div class="admonition-see-also admonition seealso">
<p class="first admonition-title">See also</p>
<p class="last"><a class="reference internal" href="mapper_config.html#sqlalchemy.orm.mapper.Mapper.all_orm_descriptors" title="sqlalchemy.orm.mapper.Mapper.all_orm_descriptors"><tt class="xref py py-attr docutils literal"><span class="pre">Mapper.all_orm_descriptors</span></tt></a></p>
</div>
</dd></dl>

<dl class="attribute">
<dt id="sqlalchemy.orm.interfaces._InspectionAttr.is_clause_element">
<tt class="descname">is_clause_element</tt><em class="property"> = False</em><a class="headerlink" href="#sqlalchemy.orm.interfaces._InspectionAttr.is_clause_element" title="Permalink to this definition">¶</a></dt>
<dd><p>True if this object is an instance of <a class="reference internal" href="../core/expression_api.html#sqlalchemy.sql.expression.ClauseElement" title="sqlalchemy.sql.expression.ClauseElement"><tt class="xref py py-class docutils literal"><span class="pre">ClauseElement</span></tt></a>.</p>
</dd></dl>

<dl class="attribute">
<dt id="sqlalchemy.orm.interfaces._InspectionAttr.is_instance">
<tt class="descname">is_instance</tt><em class="property"> = False</em><a class="headerlink" href="#sqlalchemy.orm.interfaces._InspectionAttr.is_instance" title="Permalink to this definition">¶</a></dt>
<dd><p>True if this object is an instance of <a class="reference internal" href="#sqlalchemy.orm.state.InstanceState" title="sqlalchemy.orm.state.InstanceState"><tt class="xref py py-class docutils literal"><span class="pre">InstanceState</span></tt></a>.</p>
</dd></dl>

<dl class="attribute">
<dt id="sqlalchemy.orm.interfaces._InspectionAttr.is_mapper">
<tt class="descname">is_mapper</tt><em class="property"> = False</em><a class="headerlink" href="#sqlalchemy.orm.interfaces._InspectionAttr.is_mapper" title="Permalink to this definition">¶</a></dt>
<dd><p>True if this object is an instance of <a class="reference internal" href="mapper_config.html#sqlalchemy.orm.mapper.Mapper" title="sqlalchemy.orm.mapper.Mapper"><tt class="xref py py-class docutils literal"><span class="pre">Mapper</span></tt></a>.</p>
</dd></dl>

<dl class="attribute">
<dt id="sqlalchemy.orm.interfaces._InspectionAttr.is_property">
<tt class="descname">is_property</tt><em class="property"> = False</em><a class="headerlink" href="#sqlalchemy.orm.interfaces._InspectionAttr.is_property" title="Permalink to this definition">¶</a></dt>
<dd><p>True if this object is an instance of <a class="reference internal" href="#sqlalchemy.orm.interfaces.MapperProperty" title="sqlalchemy.orm.interfaces.MapperProperty"><tt class="xref py py-class docutils literal"><span class="pre">MapperProperty</span></tt></a>.</p>
</dd></dl>

<dl class="attribute">
<dt id="sqlalchemy.orm.interfaces._InspectionAttr.is_selectable">
<tt class="descname">is_selectable</tt><em class="property"> = False</em><a class="headerlink" href="#sqlalchemy.orm.interfaces._InspectionAttr.is_selectable" title="Permalink to this definition">¶</a></dt>
<dd><p>Return True if this object is an instance of <a class="reference internal" href="../core/expression_api.html#sqlalchemy.sql.expression.Selectable" title="sqlalchemy.sql.expression.Selectable"><tt class="xref py py-class docutils literal"><span class="pre">Selectable</span></tt></a>.</p>
</dd></dl>

</dd></dl>

<dl class="class">
<dt id="sqlalchemy.orm.state.InstanceState">
<em class="property">class </em><tt class="descclassname">sqlalchemy.orm.state.</tt><tt class="descname">InstanceState</tt><big>(</big><em>obj</em>, <em>manager</em><big>)</big><a class="headerlink" href="#sqlalchemy.orm.state.InstanceState" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#sqlalchemy.orm.interfaces._InspectionAttr" title="sqlalchemy.orm.interfaces._InspectionAttr"><tt class="xref py py-class docutils literal"><span class="pre">sqlalchemy.orm.interfaces._InspectionAttr</span></tt></a></p>
<p>tracks state information at the instance level.</p>
<dl class="method">
<dt id="sqlalchemy.orm.state.InstanceState.__call__">
<tt class="descname">__call__</tt><big>(</big><em>passive</em><big>)</big><a class="headerlink" href="#sqlalchemy.orm.state.InstanceState.__call__" title="Permalink to this definition">¶</a></dt>
<dd><p>__call__ allows the InstanceState to act as a deferred
callable for loading expired attributes, which is also
serializable (picklable).</p>
</dd></dl>

<dl class="attribute">
<dt id="sqlalchemy.orm.state.InstanceState.attrs">
<tt class="descname">attrs</tt><a class="headerlink" href="#sqlalchemy.orm.state.InstanceState.attrs" title="Permalink to this definition">¶</a></dt>
<dd><p>Return a namespace representing each attribute on
the mapped object, including its current value
and history.</p>
<p>The returned object is an instance of <a class="reference internal" href="#sqlalchemy.orm.state.AttributeState" title="sqlalchemy.orm.state.AttributeState"><tt class="xref py py-class docutils literal"><span class="pre">AttributeState</span></tt></a>.</p>
</dd></dl>

<dl class="attribute">
<dt id="sqlalchemy.orm.state.InstanceState.detached">
<tt class="descname">detached</tt><a class="headerlink" href="#sqlalchemy.orm.state.InstanceState.detached" title="Permalink to this definition">¶</a></dt>
<dd><p>Return true if the object is detached.</p>
</dd></dl>

<dl class="attribute">
<dt id="sqlalchemy.orm.state.InstanceState.expired_attributes">
<tt class="descname">expired_attributes</tt><a class="headerlink" href="#sqlalchemy.orm.state.InstanceState.expired_attributes" title="Permalink to this definition">¶</a></dt>
<dd><p>Return the set of keys which are &#8216;expired&#8217; to be loaded by
the manager&#8217;s deferred scalar loader, assuming no pending
changes.</p>
<p>see also the <tt class="docutils literal"><span class="pre">unmodified</span></tt> collection which is intersected
against this set when a refresh operation occurs.</p>
</dd></dl>

<dl class="attribute">
<dt id="sqlalchemy.orm.state.InstanceState.has_identity">
<tt class="descname">has_identity</tt><a class="headerlink" href="#sqlalchemy.orm.state.InstanceState.has_identity" title="Permalink to this definition">¶</a></dt>
<dd><p>Return <tt class="docutils literal"><span class="pre">True</span></tt> if this object has an identity key.</p>
<p>This should always have the same value as the
expression <tt class="docutils literal"><span class="pre">state.persistent</span> <span class="pre">or</span> <span class="pre">state.detached</span></tt>.</p>
</dd></dl>

<dl class="attribute">
<dt id="sqlalchemy.orm.state.InstanceState.identity">
<tt class="descname">identity</tt><a class="headerlink" href="#sqlalchemy.orm.state.InstanceState.identity" title="Permalink to this definition">¶</a></dt>
<dd><p>Return the mapped identity of the mapped object.
This is the primary key identity as persisted by the ORM
which can always be passed directly to
<a class="reference internal" href="query.html#sqlalchemy.orm.query.Query.get" title="sqlalchemy.orm.query.Query.get"><tt class="xref py py-meth docutils literal"><span class="pre">Query.get()</span></tt></a>.</p>
<p>Returns <tt class="docutils literal"><span class="pre">None</span></tt> if the object has no primary key identity.</p>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">An object which is transient or pending
does <strong>not</strong> have a mapped identity until it is flushed,
even if its attributes include primary key values.</p>
</div>
</dd></dl>

<dl class="attribute">
<dt id="sqlalchemy.orm.state.InstanceState.identity_key">
<tt class="descname">identity_key</tt><a class="headerlink" href="#sqlalchemy.orm.state.InstanceState.identity_key" title="Permalink to this definition">¶</a></dt>
<dd><p>Return the identity key for the mapped object.</p>
<p>This is the key used to locate the object within
the <a class="reference internal" href="session.html#sqlalchemy.orm.session.Session.identity_map" title="sqlalchemy.orm.session.Session.identity_map"><tt class="xref py py-attr docutils literal"><span class="pre">Session.identity_map</span></tt></a> mapping.   It contains
the identity as returned by <a class="reference internal" href="#sqlalchemy.orm.state.InstanceState.identity" title="sqlalchemy.orm.state.InstanceState.identity"><tt class="xref py py-attr docutils literal"><span class="pre">identity</span></tt></a> within it.</p>
</dd></dl>

<dl class="attribute">
<dt id="sqlalchemy.orm.state.InstanceState.mapper">
<tt class="descname">mapper</tt><a class="headerlink" href="#sqlalchemy.orm.state.InstanceState.mapper" title="Permalink to this definition">¶</a></dt>
<dd><p>Return the <a class="reference internal" href="mapper_config.html#sqlalchemy.orm.mapper.Mapper" title="sqlalchemy.orm.mapper.Mapper"><tt class="xref py py-class docutils literal"><span class="pre">Mapper</span></tt></a> used for this mapepd object.</p>
</dd></dl>

<dl class="attribute">
<dt id="sqlalchemy.orm.state.InstanceState.object">
<tt class="descname">object</tt><a class="headerlink" href="#sqlalchemy.orm.state.InstanceState.object" title="Permalink to this definition">¶</a></dt>
<dd><p>Return the mapped object represented by this
<a class="reference internal" href="#sqlalchemy.orm.state.InstanceState" title="sqlalchemy.orm.state.InstanceState"><tt class="xref py py-class docutils literal"><span class="pre">InstanceState</span></tt></a>.</p>
</dd></dl>

<dl class="attribute">
<dt id="sqlalchemy.orm.state.InstanceState.pending">
<tt class="descname">pending</tt><a class="headerlink" href="#sqlalchemy.orm.state.InstanceState.pending" title="Permalink to this definition">¶</a></dt>
<dd><p>Return true if the object is pending.</p>
</dd></dl>

<dl class="attribute">
<dt id="sqlalchemy.orm.state.InstanceState.persistent">
<tt class="descname">persistent</tt><a class="headerlink" href="#sqlalchemy.orm.state.InstanceState.persistent" title="Permalink to this definition">¶</a></dt>
<dd><p>Return true if the object is persistent.</p>
</dd></dl>

<dl class="attribute">
<dt id="sqlalchemy.orm.state.InstanceState.session">
<tt class="descname">session</tt><a class="headerlink" href="#sqlalchemy.orm.state.InstanceState.session" title="Permalink to this definition">¶</a></dt>
<dd><p>Return the owning <a class="reference internal" href="session.html#sqlalchemy.orm.session.Session" title="sqlalchemy.orm.session.Session"><tt class="xref py py-class docutils literal"><span class="pre">Session</span></tt></a> for this instance,
or <tt class="docutils literal"><span class="pre">None</span></tt> if none available.</p>
</dd></dl>

<dl class="attribute">
<dt id="sqlalchemy.orm.state.InstanceState.transient">
<tt class="descname">transient</tt><a class="headerlink" href="#sqlalchemy.orm.state.InstanceState.transient" title="Permalink to this definition">¶</a></dt>
<dd><p>Return true if the object is transient.</p>
</dd></dl>

<dl class="attribute">
<dt id="sqlalchemy.orm.state.InstanceState.unloaded">
<tt class="descname">unloaded</tt><a class="headerlink" href="#sqlalchemy.orm.state.InstanceState.unloaded" title="Permalink to this definition">¶</a></dt>
<dd><p>Return the set of keys which do not have a loaded value.</p>
<p>This includes expired attributes and any other attribute that
was never populated or modified.</p>
</dd></dl>

<dl class="attribute">
<dt id="sqlalchemy.orm.state.InstanceState.unmodified">
<tt class="descname">unmodified</tt><a class="headerlink" href="#sqlalchemy.orm.state.InstanceState.unmodified" title="Permalink to this definition">¶</a></dt>
<dd><p>Return the set of keys which have no uncommitted changes</p>
</dd></dl>

<dl class="method">
<dt id="sqlalchemy.orm.state.InstanceState.unmodified_intersection">
<tt class="descname">unmodified_intersection</tt><big>(</big><em>keys</em><big>)</big><a class="headerlink" href="#sqlalchemy.orm.state.InstanceState.unmodified_intersection" title="Permalink to this definition">¶</a></dt>
<dd><p>Return self.unmodified.intersection(keys).</p>
</dd></dl>

</dd></dl>

<dl class="class">
<dt id="sqlalchemy.orm.attributes.InstrumentedAttribute">
<em class="property">class </em><tt class="descclassname">sqlalchemy.orm.attributes.</tt><tt class="descname">InstrumentedAttribute</tt><big>(</big><em>class_</em>, <em>key</em>, <em>impl=None</em>, <em>comparator=None</em>, <em>parententity=None</em>, <em>of_type=None</em><big>)</big><a class="headerlink" href="#sqlalchemy.orm.attributes.InstrumentedAttribute" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#sqlalchemy.orm.attributes.QueryableAttribute" title="sqlalchemy.orm.attributes.QueryableAttribute"><tt class="xref py py-class docutils literal"><span class="pre">sqlalchemy.orm.attributes.QueryableAttribute</span></tt></a></p>
<p>Class bound instrumented attribute which adds basic
<a class="reference internal" href="../glossary.html#term-descriptor"><em class="xref std std-term">descriptor</em></a> methods.</p>
<p>See <a class="reference internal" href="#sqlalchemy.orm.attributes.QueryableAttribute" title="sqlalchemy.orm.attributes.QueryableAttribute"><tt class="xref py py-class docutils literal"><span class="pre">QueryableAttribute</span></tt></a> for a description of most features.</p>
<dl class="method">
<dt id="sqlalchemy.orm.attributes.InstrumentedAttribute.__get__">
<tt class="descname">__get__</tt><big>(</big><em>instance</em>, <em>owner</em><big>)</big><a class="headerlink" href="#sqlalchemy.orm.attributes.InstrumentedAttribute.__get__" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="sqlalchemy.orm.attributes.InstrumentedAttribute.__set__">
<tt class="descname">__set__</tt><big>(</big><em>instance</em>, <em>value</em><big>)</big><a class="headerlink" href="#sqlalchemy.orm.attributes.InstrumentedAttribute.__set__" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="method">
<dt id="sqlalchemy.orm.attributes.InstrumentedAttribute.__delete__">
<tt class="descname">__delete__</tt><big>(</big><em>instance</em><big>)</big><a class="headerlink" href="#sqlalchemy.orm.attributes.InstrumentedAttribute.__delete__" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

</dd></dl>

<dl class="class">
<dt id="sqlalchemy.orm.interfaces.MapperProperty">
<em class="property">class </em><tt class="descclassname">sqlalchemy.orm.interfaces.</tt><tt class="descname">MapperProperty</tt><a class="headerlink" href="#sqlalchemy.orm.interfaces.MapperProperty" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <tt class="xref py py-class docutils literal"><span class="pre">sqlalchemy.orm.interfaces._MappedAttribute</span></tt>, <a class="reference internal" href="#sqlalchemy.orm.interfaces._InspectionAttr" title="sqlalchemy.orm.interfaces._InspectionAttr"><tt class="xref py py-class docutils literal"><span class="pre">sqlalchemy.orm.interfaces._InspectionAttr</span></tt></a></p>
<p>Manage the relationship of a <tt class="docutils literal"><span class="pre">Mapper</span></tt> to a single class
attribute, as well as that attribute as it appears on individual
instances of the class, including attribute instrumentation,
attribute access, loading behavior, and dependency calculations.</p>
<p>The most common occurrences of <a class="reference internal" href="#sqlalchemy.orm.interfaces.MapperProperty" title="sqlalchemy.orm.interfaces.MapperProperty"><tt class="xref py py-class docutils literal"><span class="pre">MapperProperty</span></tt></a> are the
mapped <a class="reference internal" href="../core/schema.html#sqlalchemy.schema.Column" title="sqlalchemy.schema.Column"><tt class="xref py py-class docutils literal"><span class="pre">Column</span></tt></a>, which is represented in a mapping as
an instance of <a class="reference internal" href="#sqlalchemy.orm.properties.ColumnProperty" title="sqlalchemy.orm.properties.ColumnProperty"><tt class="xref py py-class docutils literal"><span class="pre">ColumnProperty</span></tt></a>,
and a reference to another class produced by <a class="reference internal" href="relationships.html#sqlalchemy.orm.relationship" title="sqlalchemy.orm.relationship"><tt class="xref py py-func docutils literal"><span class="pre">relationship()</span></tt></a>,
represented in the mapping as an instance of
<a class="reference internal" href="#sqlalchemy.orm.properties.RelationshipProperty" title="sqlalchemy.orm.properties.RelationshipProperty"><tt class="xref py py-class docutils literal"><span class="pre">RelationshipProperty</span></tt></a>.</p>
<dl class="attribute">
<dt id="sqlalchemy.orm.interfaces.MapperProperty.cascade">
<tt class="descname">cascade</tt><em class="property"> = frozenset([])</em><a class="headerlink" href="#sqlalchemy.orm.interfaces.MapperProperty.cascade" title="Permalink to this definition">¶</a></dt>
<dd><p>The set of &#8216;cascade&#8217; attribute names.</p>
<p>This collection is checked before the &#8216;cascade_iterator&#8217; method is called.</p>
</dd></dl>

<dl class="method">
<dt id="sqlalchemy.orm.interfaces.MapperProperty.cascade_iterator">
<tt class="descname">cascade_iterator</tt><big>(</big><em>type_</em>, <em>state</em>, <em>visited_instances=None</em>, <em>halt_on=None</em><big>)</big><a class="headerlink" href="#sqlalchemy.orm.interfaces.MapperProperty.cascade_iterator" title="Permalink to this definition">¶</a></dt>
<dd><p>Iterate through instances related to the given instance for
a particular &#8216;cascade&#8217;, starting with this MapperProperty.</p>
<p>Return an iterator3-tuples (instance, mapper, state).</p>
<p>Note that the &#8216;cascade&#8217; collection on this MapperProperty is
checked first for the given type before cascade_iterator is called.</p>
<p>See PropertyLoader for the related instance implementation.</p>
</dd></dl>

<dl class="attribute">
<dt id="sqlalchemy.orm.interfaces.MapperProperty.class_attribute">
<tt class="descname">class_attribute</tt><a class="headerlink" href="#sqlalchemy.orm.interfaces.MapperProperty.class_attribute" title="Permalink to this definition">¶</a></dt>
<dd><p>Return the class-bound descriptor corresponding to this
MapperProperty.</p>
</dd></dl>

<dl class="method">
<dt id="sqlalchemy.orm.interfaces.MapperProperty.compare">
<tt class="descname">compare</tt><big>(</big><em>operator</em>, <em>value</em>, <em>**kw</em><big>)</big><a class="headerlink" href="#sqlalchemy.orm.interfaces.MapperProperty.compare" title="Permalink to this definition">¶</a></dt>
<dd><p>Return a compare operation for the columns represented by
this <tt class="docutils literal"><span class="pre">MapperProperty</span></tt> to the given value, which may be a
column value or an instance.  &#8216;operator&#8217; is an operator from
the operators module, or from sql.Comparator.</p>
<p>By default uses the PropComparator attached to this MapperProperty
under the attribute name &#8220;comparator&#8221;.</p>
</dd></dl>

<dl class="method">
<dt id="sqlalchemy.orm.interfaces.MapperProperty.create_row_processor">
<tt class="descname">create_row_processor</tt><big>(</big><em>context</em>, <em>path</em>, <em>mapper</em>, <em>row</em>, <em>adapter</em><big>)</big><a class="headerlink" href="#sqlalchemy.orm.interfaces.MapperProperty.create_row_processor" title="Permalink to this definition">¶</a></dt>
<dd><p>Return a 3-tuple consisting of three row processing functions.</p>
</dd></dl>

<dl class="method">
<dt id="sqlalchemy.orm.interfaces.MapperProperty.do_init">
<tt class="descname">do_init</tt><big>(</big><big>)</big><a class="headerlink" href="#sqlalchemy.orm.interfaces.MapperProperty.do_init" title="Permalink to this definition">¶</a></dt>
<dd><p>Perform subclass-specific initialization post-mapper-creation
steps.</p>
<p>This is a template method called by the <tt class="docutils literal"><span class="pre">MapperProperty</span></tt>
object&#8217;s init() method.</p>
</dd></dl>

<dl class="attribute">
<dt id="sqlalchemy.orm.interfaces.MapperProperty.info">
<tt class="descname">info</tt><a class="headerlink" href="#sqlalchemy.orm.interfaces.MapperProperty.info" title="Permalink to this definition">¶</a></dt>
<dd><p>Info dictionary associated with the object, allowing user-defined
data to be associated with this <a class="reference internal" href="#sqlalchemy.orm.interfaces.MapperProperty" title="sqlalchemy.orm.interfaces.MapperProperty"><tt class="xref py py-class docutils literal"><span class="pre">MapperProperty</span></tt></a>.</p>
<p>The dictionary is generated when first accessed.  Alternatively,
it can be specified as a constructor argument to the
<a class="reference internal" href="mapper_config.html#sqlalchemy.orm.column_property" title="sqlalchemy.orm.column_property"><tt class="xref py py-func docutils literal"><span class="pre">column_property()</span></tt></a>, <a class="reference internal" href="relationships.html#sqlalchemy.orm.relationship" title="sqlalchemy.orm.relationship"><tt class="xref py py-func docutils literal"><span class="pre">relationship()</span></tt></a>, or <a class="reference internal" href="mapper_config.html#sqlalchemy.orm.composite" title="sqlalchemy.orm.composite"><tt class="xref py py-func docutils literal"><span class="pre">composite()</span></tt></a>
functions.</p>
<p class="versionadded">
<span class="versionmodified">New in version 0.8: </span>Added support for .info to all
<a class="reference internal" href="#sqlalchemy.orm.interfaces.MapperProperty" title="sqlalchemy.orm.interfaces.MapperProperty"><tt class="xref py py-class docutils literal"><span class="pre">MapperProperty</span></tt></a> subclasses.</p>
<div class="admonition-see-also admonition seealso">
<p class="first admonition-title">See also</p>
<p><a class="reference internal" href="#sqlalchemy.orm.attributes.QueryableAttribute.info" title="sqlalchemy.orm.attributes.QueryableAttribute.info"><tt class="xref py py-attr docutils literal"><span class="pre">QueryableAttribute.info</span></tt></a></p>
<p class="last"><a class="reference internal" href="../core/schema.html#sqlalchemy.schema.SchemaItem.info" title="sqlalchemy.schema.SchemaItem.info"><tt class="xref py py-attr docutils literal"><span class="pre">SchemaItem.info</span></tt></a></p>
</div>
</dd></dl>

<dl class="method">
<dt id="sqlalchemy.orm.interfaces.MapperProperty.init">
<tt class="descname">init</tt><big>(</big><big>)</big><a class="headerlink" href="#sqlalchemy.orm.interfaces.MapperProperty.init" title="Permalink to this definition">¶</a></dt>
<dd><p>Called after all mappers are created to assemble
relationships between mappers and perform other post-mapper-creation
initialization steps.</p>
</dd></dl>

<dl class="method">
<dt id="sqlalchemy.orm.interfaces.MapperProperty.is_primary">
<tt class="descname">is_primary</tt><big>(</big><big>)</big><a class="headerlink" href="#sqlalchemy.orm.interfaces.MapperProperty.is_primary" title="Permalink to this definition">¶</a></dt>
<dd><p>Return True if this <tt class="docutils literal"><span class="pre">MapperProperty</span></tt>&#8216;s mapper is the
primary mapper for its class.</p>
<p>This flag is used to indicate that the <tt class="docutils literal"><span class="pre">MapperProperty</span></tt> can
define attribute instrumentation for the class at the class
level (as opposed to the individual instance level).</p>
</dd></dl>

<dl class="method">
<dt id="sqlalchemy.orm.interfaces.MapperProperty.merge">
<tt class="descname">merge</tt><big>(</big><em>session</em>, <em>source_state</em>, <em>source_dict</em>, <em>dest_state</em>, <em>dest_dict</em>, <em>load</em>, <em>_recursive</em><big>)</big><a class="headerlink" href="#sqlalchemy.orm.interfaces.MapperProperty.merge" title="Permalink to this definition">¶</a></dt>
<dd><p>Merge the attribute represented by this <tt class="docutils literal"><span class="pre">MapperProperty</span></tt>
from source to destination object</p>
</dd></dl>

<dl class="method">
<dt id="sqlalchemy.orm.interfaces.MapperProperty.post_instrument_class">
<tt class="descname">post_instrument_class</tt><big>(</big><em>mapper</em><big>)</big><a class="headerlink" href="#sqlalchemy.orm.interfaces.MapperProperty.post_instrument_class" title="Permalink to this definition">¶</a></dt>
<dd><p>Perform instrumentation adjustments that need to occur
after init() has completed.</p>
</dd></dl>

<dl class="method">
<dt id="sqlalchemy.orm.interfaces.MapperProperty.setup">
<tt class="descname">setup</tt><big>(</big><em>context</em>, <em>entity</em>, <em>path</em>, <em>adapter</em>, <em>**kwargs</em><big>)</big><a class="headerlink" href="#sqlalchemy.orm.interfaces.MapperProperty.setup" title="Permalink to this definition">¶</a></dt>
<dd><p>Called by Query for the purposes of constructing a SQL statement.</p>
<p>Each MapperProperty associated with the target mapper processes the
statement referenced by the query context, adding columns and/or
criterion as appropriate.</p>
</dd></dl>

</dd></dl>

<dl class="data">
<dt id="sqlalchemy.orm.interfaces.NOT_EXTENSION">
<tt class="descclassname">sqlalchemy.orm.interfaces.</tt><tt class="descname">NOT_EXTENSION</tt><em class="property"> = &lt;symbol 'NOT_EXTENSION&gt;</em><a class="headerlink" href="#sqlalchemy.orm.interfaces.NOT_EXTENSION" title="Permalink to this definition">¶</a></dt>
<dd></dd></dl>

<dl class="class">
<dt id="sqlalchemy.orm.interfaces.PropComparator">
<em class="property">class </em><tt class="descclassname">sqlalchemy.orm.interfaces.</tt><tt class="descname">PropComparator</tt><big>(</big><em>prop</em>, <em>parentmapper</em>, <em>adapter=None</em><big>)</big><a class="headerlink" href="#sqlalchemy.orm.interfaces.PropComparator" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="../core/expression_api.html#sqlalchemy.sql.operators.ColumnOperators" title="sqlalchemy.sql.operators.ColumnOperators"><tt class="xref py py-class docutils literal"><span class="pre">sqlalchemy.sql.operators.ColumnOperators</span></tt></a></p>
<p>Defines boolean, comparison, and other operators for
<a class="reference internal" href="#sqlalchemy.orm.interfaces.MapperProperty" title="sqlalchemy.orm.interfaces.MapperProperty"><tt class="xref py py-class docutils literal"><span class="pre">MapperProperty</span></tt></a> objects.</p>
<p>SQLAlchemy allows for operators to
be redefined at both the Core and ORM level.  <a class="reference internal" href="#sqlalchemy.orm.interfaces.PropComparator" title="sqlalchemy.orm.interfaces.PropComparator"><tt class="xref py py-class docutils literal"><span class="pre">PropComparator</span></tt></a>
is the base class of operator redefinition for ORM-level operations,
including those of <a class="reference internal" href="#sqlalchemy.orm.properties.ColumnProperty" title="sqlalchemy.orm.properties.ColumnProperty"><tt class="xref py py-class docutils literal"><span class="pre">ColumnProperty</span></tt></a>,
<a class="reference internal" href="#sqlalchemy.orm.properties.RelationshipProperty" title="sqlalchemy.orm.properties.RelationshipProperty"><tt class="xref py py-class docutils literal"><span class="pre">RelationshipProperty</span></tt></a>, and <a class="reference internal" href="#sqlalchemy.orm.descriptor_props.CompositeProperty" title="sqlalchemy.orm.descriptor_props.CompositeProperty"><tt class="xref py py-class docutils literal"><span class="pre">CompositeProperty</span></tt></a>.</p>
<div class="admonition note">
<p class="first admonition-title">Note</p>
<p class="last">With the advent of Hybrid properties introduced in SQLAlchemy
0.7, as well as Core-level operator redefinition in
SQLAlchemy 0.8, the use case for user-defined <a class="reference internal" href="#sqlalchemy.orm.interfaces.PropComparator" title="sqlalchemy.orm.interfaces.PropComparator"><tt class="xref py py-class docutils literal"><span class="pre">PropComparator</span></tt></a>
instances is extremely rare.  See <a class="reference internal" href="extensions/hybrid.html"><em>Hybrid Attributes</em></a> as well
as <a class="reference internal" href="../core/types.html#types-operators"><em>Redefining and Creating New Operators</em></a>.</p>
</div>
<p>User-defined subclasses of <a class="reference internal" href="#sqlalchemy.orm.interfaces.PropComparator" title="sqlalchemy.orm.interfaces.PropComparator"><tt class="xref py py-class docutils literal"><span class="pre">PropComparator</span></tt></a> may be created. The
built-in Python comparison and math operator methods, such as
<a class="reference internal" href="../core/expression_api.html#sqlalchemy.sql.operators.ColumnOperators.__eq__" title="sqlalchemy.sql.operators.ColumnOperators.__eq__"><tt class="xref py py-meth docutils literal"><span class="pre">operators.ColumnOperators.__eq__()</span></tt></a>,
<a class="reference internal" href="../core/expression_api.html#sqlalchemy.sql.operators.ColumnOperators.__lt__" title="sqlalchemy.sql.operators.ColumnOperators.__lt__"><tt class="xref py py-meth docutils literal"><span class="pre">operators.ColumnOperators.__lt__()</span></tt></a>, and
<a class="reference internal" href="../core/expression_api.html#sqlalchemy.sql.operators.ColumnOperators.__add__" title="sqlalchemy.sql.operators.ColumnOperators.__add__"><tt class="xref py py-meth docutils literal"><span class="pre">operators.ColumnOperators.__add__()</span></tt></a>, can be overridden to provide
new operator behavior. The custom <a class="reference internal" href="#sqlalchemy.orm.interfaces.PropComparator" title="sqlalchemy.orm.interfaces.PropComparator"><tt class="xref py py-class docutils literal"><span class="pre">PropComparator</span></tt></a> is passed to
the <a class="reference internal" href="#sqlalchemy.orm.interfaces.MapperProperty" title="sqlalchemy.orm.interfaces.MapperProperty"><tt class="xref py py-class docutils literal"><span class="pre">MapperProperty</span></tt></a> instance via the <tt class="docutils literal"><span class="pre">comparator_factory</span></tt>
argument. In each case,
the appropriate subclass of <a class="reference internal" href="#sqlalchemy.orm.interfaces.PropComparator" title="sqlalchemy.orm.interfaces.PropComparator"><tt class="xref py py-class docutils literal"><span class="pre">PropComparator</span></tt></a> should be used:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="c"># definition of custom PropComparator subclasses</span>

<span class="kn">from</span> <span class="nn">sqlalchemy.orm.properties</span> <span class="kn">import</span> \
                        <span class="n">ColumnProperty</span><span class="p">,</span>\
                        <span class="n">CompositeProperty</span><span class="p">,</span>\
                        <span class="n">RelationshipProperty</span>

<span class="k">class</span> <span class="nc">MyColumnComparator</span><span class="p">(</span><span class="n">ColumnProperty</span><span class="o">.</span><span class="n">Comparator</span><span class="p">):</span>
    <span class="k">def</span> <span class="nf">__eq__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">other</span><span class="p">):</span>
        <span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">__clause_element__</span><span class="p">()</span> <span class="o">==</span> <span class="n">other</span>

<span class="k">class</span> <span class="nc">MyRelationshipComparator</span><span class="p">(</span><span class="n">RelationshipProperty</span><span class="o">.</span><span class="n">Comparator</span><span class="p">):</span>
    <span class="k">def</span> <span class="nf">any</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">expression</span><span class="p">):</span>
        <span class="s">&quot;define the &#39;any&#39; operation&quot;</span>
        <span class="c"># ...</span>

<span class="k">class</span> <span class="nc">MyCompositeComparator</span><span class="p">(</span><span class="n">CompositeProperty</span><span class="o">.</span><span class="n">Comparator</span><span class="p">):</span>
    <span class="k">def</span> <span class="nf">__gt__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">other</span><span class="p">):</span>
        <span class="s">&quot;redefine the &#39;greater than&#39; operation&quot;</span>

        <span class="k">return</span> <span class="n">sql</span><span class="o">.</span><span class="n">and_</span><span class="p">(</span><span class="o">*</span><span class="p">[</span><span class="n">a</span><span class="o">&gt;</span><span class="n">b</span> <span class="k">for</span> <span class="n">a</span><span class="p">,</span> <span class="n">b</span> <span class="ow">in</span>
                          <span class="nb">zip</span><span class="p">(</span><span class="bp">self</span><span class="o">.</span><span class="n">__clause_element__</span><span class="p">()</span><span class="o">.</span><span class="n">clauses</span><span class="p">,</span>
                              <span class="n">other</span><span class="o">.</span><span class="n">__composite_values__</span><span class="p">())])</span>


<span class="c"># application of custom PropComparator subclasses</span>

<span class="kn">from</span> <span class="nn">sqlalchemy.orm</span> <span class="kn">import</span> <span class="n">column_property</span><span class="p">,</span> <span class="n">relationship</span><span class="p">,</span> <span class="n">composite</span>
<span class="kn">from</span> <span class="nn">sqlalchemy</span> <span class="kn">import</span> <span class="n">Column</span><span class="p">,</span> <span class="n">String</span>

<span class="k">class</span> <span class="nc">SomeMappedClass</span><span class="p">(</span><span class="n">Base</span><span class="p">):</span>
    <span class="n">some_column</span> <span class="o">=</span> <span class="n">column_property</span><span class="p">(</span><span class="n">Column</span><span class="p">(</span><span class="s">&quot;some_column&quot;</span><span class="p">,</span> <span class="n">String</span><span class="p">),</span>
                        <span class="n">comparator_factory</span><span class="o">=</span><span class="n">MyColumnComparator</span><span class="p">)</span>

    <span class="n">some_relationship</span> <span class="o">=</span> <span class="n">relationship</span><span class="p">(</span><span class="n">SomeOtherClass</span><span class="p">,</span>
                        <span class="n">comparator_factory</span><span class="o">=</span><span class="n">MyRelationshipComparator</span><span class="p">)</span>

    <span class="n">some_composite</span> <span class="o">=</span> <span class="n">composite</span><span class="p">(</span>
            <span class="n">Column</span><span class="p">(</span><span class="s">&quot;a&quot;</span><span class="p">,</span> <span class="n">String</span><span class="p">),</span> <span class="n">Column</span><span class="p">(</span><span class="s">&quot;b&quot;</span><span class="p">,</span> <span class="n">String</span><span class="p">),</span>
            <span class="n">comparator_factory</span><span class="o">=</span><span class="n">MyCompositeComparator</span>
        <span class="p">)</span></pre></div>
</div>
<p>Note that for column-level operator redefinition, it&#8217;s usually
simpler to define the operators at the Core level, using the
<a class="reference internal" href="../core/types.html#sqlalchemy.types.TypeEngine.comparator_factory" title="sqlalchemy.types.TypeEngine.comparator_factory"><tt class="xref py py-attr docutils literal"><span class="pre">TypeEngine.comparator_factory</span></tt></a> attribute.  See
<a class="reference internal" href="../core/types.html#types-operators"><em>Redefining and Creating New Operators</em></a> for more detail.</p>
<p>See also:</p>
<p><a class="reference internal" href="#sqlalchemy.orm.properties.ColumnProperty.Comparator" title="sqlalchemy.orm.properties.ColumnProperty.Comparator"><tt class="xref py py-class docutils literal"><span class="pre">ColumnProperty.Comparator</span></tt></a></p>
<p><a class="reference internal" href="#sqlalchemy.orm.properties.RelationshipProperty.Comparator" title="sqlalchemy.orm.properties.RelationshipProperty.Comparator"><tt class="xref py py-class docutils literal"><span class="pre">RelationshipProperty.Comparator</span></tt></a></p>
<p><a class="reference internal" href="#sqlalchemy.orm.descriptor_props.CompositeProperty.Comparator" title="sqlalchemy.orm.descriptor_props.CompositeProperty.Comparator"><tt class="xref py py-class docutils literal"><span class="pre">CompositeProperty.Comparator</span></tt></a></p>
<p><a class="reference internal" href="../core/expression_api.html#sqlalchemy.sql.operators.ColumnOperators" title="sqlalchemy.sql.operators.ColumnOperators"><tt class="xref py py-class docutils literal"><span class="pre">ColumnOperators</span></tt></a></p>
<p><a class="reference internal" href="../core/types.html#types-operators"><em>Redefining and Creating New Operators</em></a></p>
<p><a class="reference internal" href="../core/types.html#sqlalchemy.types.TypeEngine.comparator_factory" title="sqlalchemy.types.TypeEngine.comparator_factory"><tt class="xref py py-attr docutils literal"><span class="pre">TypeEngine.comparator_factory</span></tt></a></p>
<dl class="method">
<dt id="sqlalchemy.orm.interfaces.PropComparator.__eq__">
<tt class="descname">__eq__</tt><big>(</big><em>other</em><big>)</big><a class="headerlink" href="#sqlalchemy.orm.interfaces.PropComparator.__eq__" title="Permalink to this definition">¶</a></dt>
<dd><div class="inherited-member container">
<em>inherited from the</em> <a class="reference internal" href="../core/expression_api.html#sqlalchemy.sql.operators.ColumnOperators.__eq__" title="sqlalchemy.sql.operators.ColumnOperators.__eq__"><tt class="xref py py-meth docutils literal"><span class="pre">__eq__()</span></tt></a> <em>method of</em> <a class="reference internal" href="../core/expression_api.html#sqlalchemy.sql.operators.ColumnOperators" title="sqlalchemy.sql.operators.ColumnOperators"><tt class="xref py py-class docutils literal"><span class="pre">ColumnOperators</span></tt></a></div>
<p>Implement the <tt class="docutils literal"><span class="pre">==</span></tt> operator.</p>
<p>In a column context, produces the clause <tt class="docutils literal"><span class="pre">a</span> <span class="pre">=</span> <span class="pre">b</span></tt>.
If the target is <tt class="docutils literal"><span class="pre">None</span></tt>, produces <tt class="docutils literal"><span class="pre">a</span> <span class="pre">IS</span> <span class="pre">NULL</span></tt>.</p>
</dd></dl>

<dl class="method">
<dt id="sqlalchemy.orm.interfaces.PropComparator.__le__">
<tt class="descname">__le__</tt><big>(</big><em>other</em><big>)</big><a class="headerlink" href="#sqlalchemy.orm.interfaces.PropComparator.__le__" title="Permalink to this definition">¶</a></dt>
<dd><div class="inherited-member container">
<em>inherited from the</em> <a class="reference internal" href="../core/expression_api.html#sqlalchemy.sql.operators.ColumnOperators.__le__" title="sqlalchemy.sql.operators.ColumnOperators.__le__"><tt class="xref py py-meth docutils literal"><span class="pre">__le__()</span></tt></a> <em>method of</em> <a class="reference internal" href="../core/expression_api.html#sqlalchemy.sql.operators.ColumnOperators" title="sqlalchemy.sql.operators.ColumnOperators"><tt class="xref py py-class docutils literal"><span class="pre">ColumnOperators</span></tt></a></div>
<p>Implement the <tt class="docutils literal"><span class="pre">&lt;=</span></tt> operator.</p>
<p>In a column context, produces the clause <tt class="docutils literal"><span class="pre">a</span> <span class="pre">&lt;=</span> <span class="pre">b</span></tt>.</p>
</dd></dl>

<dl class="method">
<dt id="sqlalchemy.orm.interfaces.PropComparator.__lt__">
<tt class="descname">__lt__</tt><big>(</big><em>other</em><big>)</big><a class="headerlink" href="#sqlalchemy.orm.interfaces.PropComparator.__lt__" title="Permalink to this definition">¶</a></dt>
<dd><div class="inherited-member container">
<em>inherited from the</em> <a class="reference internal" href="../core/expression_api.html#sqlalchemy.sql.operators.ColumnOperators.__lt__" title="sqlalchemy.sql.operators.ColumnOperators.__lt__"><tt class="xref py py-meth docutils literal"><span class="pre">__lt__()</span></tt></a> <em>method of</em> <a class="reference internal" href="../core/expression_api.html#sqlalchemy.sql.operators.ColumnOperators" title="sqlalchemy.sql.operators.ColumnOperators"><tt class="xref py py-class docutils literal"><span class="pre">ColumnOperators</span></tt></a></div>
<p>Implement the <tt class="docutils literal"><span class="pre">&lt;</span></tt> operator.</p>
<p>In a column context, produces the clause <tt class="docutils literal"><span class="pre">a</span> <span class="pre">&lt;</span> <span class="pre">b</span></tt>.</p>
</dd></dl>

<dl class="method">
<dt id="sqlalchemy.orm.interfaces.PropComparator.__ne__">
<tt class="descname">__ne__</tt><big>(</big><em>other</em><big>)</big><a class="headerlink" href="#sqlalchemy.orm.interfaces.PropComparator.__ne__" title="Permalink to this definition">¶</a></dt>
<dd><div class="inherited-member container">
<em>inherited from the</em> <a class="reference internal" href="../core/expression_api.html#sqlalchemy.sql.operators.ColumnOperators.__ne__" title="sqlalchemy.sql.operators.ColumnOperators.__ne__"><tt class="xref py py-meth docutils literal"><span class="pre">__ne__()</span></tt></a> <em>method of</em> <a class="reference internal" href="../core/expression_api.html#sqlalchemy.sql.operators.ColumnOperators" title="sqlalchemy.sql.operators.ColumnOperators"><tt class="xref py py-class docutils literal"><span class="pre">ColumnOperators</span></tt></a></div>
<p>Implement the <tt class="docutils literal"><span class="pre">!=</span></tt> operator.</p>
<p>In a column context, produces the clause <tt class="docutils literal"><span class="pre">a</span> <span class="pre">!=</span> <span class="pre">b</span></tt>.
If the target is <tt class="docutils literal"><span class="pre">None</span></tt>, produces <tt class="docutils literal"><span class="pre">a</span> <span class="pre">IS</span> <span class="pre">NOT</span> <span class="pre">NULL</span></tt>.</p>
</dd></dl>

<dl class="method">
<dt id="sqlalchemy.orm.interfaces.PropComparator.adapted">
<tt class="descname">adapted</tt><big>(</big><em>adapter</em><big>)</big><a class="headerlink" href="#sqlalchemy.orm.interfaces.PropComparator.adapted" title="Permalink to this definition">¶</a></dt>
<dd><p>Return a copy of this PropComparator which will use the given
adaption function on the local side of generated expressions.</p>
</dd></dl>

<dl class="method">
<dt id="sqlalchemy.orm.interfaces.PropComparator.any">
<tt class="descname">any</tt><big>(</big><em>criterion=None</em>, <em>**kwargs</em><big>)</big><a class="headerlink" href="#sqlalchemy.orm.interfaces.PropComparator.any" title="Permalink to this definition">¶</a></dt>
<dd><p>Return true if this collection contains any member that meets the
given criterion.</p>
<p>The usual implementation of <tt class="docutils literal"><span class="pre">any()</span></tt> is
<a class="reference internal" href="#sqlalchemy.orm.properties.RelationshipProperty.Comparator.any" title="sqlalchemy.orm.properties.RelationshipProperty.Comparator.any"><tt class="xref py py-meth docutils literal"><span class="pre">RelationshipProperty.Comparator.any()</span></tt></a>.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
<li><strong>criterion</strong> &#8211; an optional ClauseElement formulated against the
member class&#8217; table or attributes.</li>
<li><strong>**kwargs</strong> &#8211; key/value pairs corresponding to member class
attribute names which will be compared via equality to the
corresponding values.</li>
</ul>
</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="sqlalchemy.orm.interfaces.PropComparator.asc">
<tt class="descname">asc</tt><big>(</big><big>)</big><a class="headerlink" href="#sqlalchemy.orm.interfaces.PropComparator.asc" title="Permalink to this definition">¶</a></dt>
<dd><div class="inherited-member container">
<em>inherited from the</em> <a class="reference internal" href="../core/expression_api.html#sqlalchemy.sql.operators.ColumnOperators.asc" title="sqlalchemy.sql.operators.ColumnOperators.asc"><tt class="xref py py-meth docutils literal"><span class="pre">asc()</span></tt></a> <em>method of</em> <a class="reference internal" href="../core/expression_api.html#sqlalchemy.sql.operators.ColumnOperators" title="sqlalchemy.sql.operators.ColumnOperators"><tt class="xref py py-class docutils literal"><span class="pre">ColumnOperators</span></tt></a></div>
<p>Produce a <a class="reference internal" href="../core/expression_api.html#sqlalchemy.sql.expression.asc" title="sqlalchemy.sql.expression.asc"><tt class="xref py py-func docutils literal"><span class="pre">asc()</span></tt></a> clause against the
parent object.</p>
</dd></dl>

<dl class="method">
<dt id="sqlalchemy.orm.interfaces.PropComparator.between">
<tt class="descname">between</tt><big>(</big><em>cleft</em>, <em>cright</em><big>)</big><a class="headerlink" href="#sqlalchemy.orm.interfaces.PropComparator.between" title="Permalink to this definition">¶</a></dt>
<dd><div class="inherited-member container">
<em>inherited from the</em> <a class="reference internal" href="../core/expression_api.html#sqlalchemy.sql.operators.ColumnOperators.between" title="sqlalchemy.sql.operators.ColumnOperators.between"><tt class="xref py py-meth docutils literal"><span class="pre">between()</span></tt></a> <em>method of</em> <a class="reference internal" href="../core/expression_api.html#sqlalchemy.sql.operators.ColumnOperators" title="sqlalchemy.sql.operators.ColumnOperators"><tt class="xref py py-class docutils literal"><span class="pre">ColumnOperators</span></tt></a></div>
<p>Produce a <a class="reference internal" href="../core/expression_api.html#sqlalchemy.sql.expression.between" title="sqlalchemy.sql.expression.between"><tt class="xref py py-func docutils literal"><span class="pre">between()</span></tt></a> clause against
the parent object, given the lower and upper range.</p>
</dd></dl>

<dl class="method">
<dt id="sqlalchemy.orm.interfaces.PropComparator.collate">
<tt class="descname">collate</tt><big>(</big><em>collation</em><big>)</big><a class="headerlink" href="#sqlalchemy.orm.interfaces.PropComparator.collate" title="Permalink to this definition">¶</a></dt>
<dd><div class="inherited-member container">
<em>inherited from the</em> <a class="reference internal" href="../core/expression_api.html#sqlalchemy.sql.operators.ColumnOperators.collate" title="sqlalchemy.sql.operators.ColumnOperators.collate"><tt class="xref py py-meth docutils literal"><span class="pre">collate()</span></tt></a> <em>method of</em> <a class="reference internal" href="../core/expression_api.html#sqlalchemy.sql.operators.ColumnOperators" title="sqlalchemy.sql.operators.ColumnOperators"><tt class="xref py py-class docutils literal"><span class="pre">ColumnOperators</span></tt></a></div>
<p>Produce a <a class="reference internal" href="../core/expression_api.html#sqlalchemy.sql.expression.collate" title="sqlalchemy.sql.expression.collate"><tt class="xref py py-func docutils literal"><span class="pre">collate()</span></tt></a> clause against
the parent object, given the collation string.</p>
</dd></dl>

<dl class="method">
<dt id="sqlalchemy.orm.interfaces.PropComparator.concat">
<tt class="descname">concat</tt><big>(</big><em>other</em><big>)</big><a class="headerlink" href="#sqlalchemy.orm.interfaces.PropComparator.concat" title="Permalink to this definition">¶</a></dt>
<dd><div class="inherited-member container">
<em>inherited from the</em> <a class="reference internal" href="../core/expression_api.html#sqlalchemy.sql.operators.ColumnOperators.concat" title="sqlalchemy.sql.operators.ColumnOperators.concat"><tt class="xref py py-meth docutils literal"><span class="pre">concat()</span></tt></a> <em>method of</em> <a class="reference internal" href="../core/expression_api.html#sqlalchemy.sql.operators.ColumnOperators" title="sqlalchemy.sql.operators.ColumnOperators"><tt class="xref py py-class docutils literal"><span class="pre">ColumnOperators</span></tt></a></div>
<p>Implement the &#8216;concat&#8217; operator.</p>
<p>In a column context, produces the clause <tt class="docutils literal"><span class="pre">a</span> <span class="pre">||</span> <span class="pre">b</span></tt>,
or uses the <tt class="docutils literal"><span class="pre">concat()</span></tt> operator on MySQL.</p>
</dd></dl>

<dl class="method">
<dt id="sqlalchemy.orm.interfaces.PropComparator.contains">
<tt class="descname">contains</tt><big>(</big><em>other</em>, <em>**kwargs</em><big>)</big><a class="headerlink" href="#sqlalchemy.orm.interfaces.PropComparator.contains" title="Permalink to this definition">¶</a></dt>
<dd><div class="inherited-member container">
<em>inherited from the</em> <a class="reference internal" href="../core/expression_api.html#sqlalchemy.sql.operators.ColumnOperators.contains" title="sqlalchemy.sql.operators.ColumnOperators.contains"><tt class="xref py py-meth docutils literal"><span class="pre">contains()</span></tt></a> <em>method of</em> <a class="reference internal" href="../core/expression_api.html#sqlalchemy.sql.operators.ColumnOperators" title="sqlalchemy.sql.operators.ColumnOperators"><tt class="xref py py-class docutils literal"><span class="pre">ColumnOperators</span></tt></a></div>
<p>Implement the &#8216;contains&#8217; operator.</p>
<p>In a column context, produces the clause <tt class="docutils literal"><span class="pre">LIKE</span> <span class="pre">'%&lt;other&gt;%'</span></tt></p>
</dd></dl>

<dl class="method">
<dt id="sqlalchemy.orm.interfaces.PropComparator.desc">
<tt class="descname">desc</tt><big>(</big><big>)</big><a class="headerlink" href="#sqlalchemy.orm.interfaces.PropComparator.desc" title="Permalink to this definition">¶</a></dt>
<dd><div class="inherited-member container">
<em>inherited from the</em> <a class="reference internal" href="../core/expression_api.html#sqlalchemy.sql.operators.ColumnOperators.desc" title="sqlalchemy.sql.operators.ColumnOperators.desc"><tt class="xref py py-meth docutils literal"><span class="pre">desc()</span></tt></a> <em>method of</em> <a class="reference internal" href="../core/expression_api.html#sqlalchemy.sql.operators.ColumnOperators" title="sqlalchemy.sql.operators.ColumnOperators"><tt class="xref py py-class docutils literal"><span class="pre">ColumnOperators</span></tt></a></div>
<p>Produce a <a class="reference internal" href="../core/expression_api.html#sqlalchemy.sql.expression.desc" title="sqlalchemy.sql.expression.desc"><tt class="xref py py-func docutils literal"><span class="pre">desc()</span></tt></a> clause against the
parent object.</p>
</dd></dl>

<dl class="method">
<dt id="sqlalchemy.orm.interfaces.PropComparator.distinct">
<tt class="descname">distinct</tt><big>(</big><big>)</big><a class="headerlink" href="#sqlalchemy.orm.interfaces.PropComparator.distinct" title="Permalink to this definition">¶</a></dt>
<dd><div class="inherited-member container">
<em>inherited from the</em> <a class="reference internal" href="../core/expression_api.html#sqlalchemy.sql.operators.ColumnOperators.distinct" title="sqlalchemy.sql.operators.ColumnOperators.distinct"><tt class="xref py py-meth docutils literal"><span class="pre">distinct()</span></tt></a> <em>method of</em> <a class="reference internal" href="../core/expression_api.html#sqlalchemy.sql.operators.ColumnOperators" title="sqlalchemy.sql.operators.ColumnOperators"><tt class="xref py py-class docutils literal"><span class="pre">ColumnOperators</span></tt></a></div>
<p>Produce a <a class="reference internal" href="../core/expression_api.html#sqlalchemy.sql.expression.distinct" title="sqlalchemy.sql.expression.distinct"><tt class="xref py py-func docutils literal"><span class="pre">distinct()</span></tt></a> clause against the
parent object.</p>
</dd></dl>

<dl class="method">
<dt id="sqlalchemy.orm.interfaces.PropComparator.endswith">
<tt class="descname">endswith</tt><big>(</big><em>other</em>, <em>**kwargs</em><big>)</big><a class="headerlink" href="#sqlalchemy.orm.interfaces.PropComparator.endswith" title="Permalink to this definition">¶</a></dt>
<dd><div class="inherited-member container">
<em>inherited from the</em> <a class="reference internal" href="../core/expression_api.html#sqlalchemy.sql.operators.ColumnOperators.endswith" title="sqlalchemy.sql.operators.ColumnOperators.endswith"><tt class="xref py py-meth docutils literal"><span class="pre">endswith()</span></tt></a> <em>method of</em> <a class="reference internal" href="../core/expression_api.html#sqlalchemy.sql.operators.ColumnOperators" title="sqlalchemy.sql.operators.ColumnOperators"><tt class="xref py py-class docutils literal"><span class="pre">ColumnOperators</span></tt></a></div>
<p>Implement the &#8216;endswith&#8217; operator.</p>
<p>In a column context, produces the clause <tt class="docutils literal"><span class="pre">LIKE</span> <span class="pre">'%&lt;other&gt;'</span></tt></p>
</dd></dl>

<dl class="method">
<dt id="sqlalchemy.orm.interfaces.PropComparator.has">
<tt class="descname">has</tt><big>(</big><em>criterion=None</em>, <em>**kwargs</em><big>)</big><a class="headerlink" href="#sqlalchemy.orm.interfaces.PropComparator.has" title="Permalink to this definition">¶</a></dt>
<dd><p>Return true if this element references a member which meets the
given criterion.</p>
<p>The usual implementation of <tt class="docutils literal"><span class="pre">has()</span></tt> is
<a class="reference internal" href="#sqlalchemy.orm.properties.RelationshipProperty.Comparator.has" title="sqlalchemy.orm.properties.RelationshipProperty.Comparator.has"><tt class="xref py py-meth docutils literal"><span class="pre">RelationshipProperty.Comparator.has()</span></tt></a>.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
<li><strong>criterion</strong> &#8211; an optional ClauseElement formulated against the
member class&#8217; table or attributes.</li>
<li><strong>**kwargs</strong> &#8211; key/value pairs corresponding to member class
attribute names which will be compared via equality to the
corresponding values.</li>
</ul>
</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="sqlalchemy.orm.interfaces.PropComparator.ilike">
<tt class="descname">ilike</tt><big>(</big><em>other</em>, <em>escape=None</em><big>)</big><a class="headerlink" href="#sqlalchemy.orm.interfaces.PropComparator.ilike" title="Permalink to this definition">¶</a></dt>
<dd><div class="inherited-member container">
<em>inherited from the</em> <a class="reference internal" href="../core/expression_api.html#sqlalchemy.sql.operators.ColumnOperators.ilike" title="sqlalchemy.sql.operators.ColumnOperators.ilike"><tt class="xref py py-meth docutils literal"><span class="pre">ilike()</span></tt></a> <em>method of</em> <a class="reference internal" href="../core/expression_api.html#sqlalchemy.sql.operators.ColumnOperators" title="sqlalchemy.sql.operators.ColumnOperators"><tt class="xref py py-class docutils literal"><span class="pre">ColumnOperators</span></tt></a></div>
<p>Implement the <tt class="docutils literal"><span class="pre">ilike</span></tt> operator.</p>
<p>In a column context, produces the clause <tt class="docutils literal"><span class="pre">a</span> <span class="pre">ILIKE</span> <span class="pre">other</span></tt>.</p>
<p>E.g.:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="n">select</span><span class="p">([</span><span class="n">sometable</span><span class="p">])</span><span class="o">.</span><span class="n">where</span><span class="p">(</span><span class="n">sometable</span><span class="o">.</span><span class="n">c</span><span class="o">.</span><span class="n">column</span><span class="o">.</span><span class="n">ilike</span><span class="p">(</span><span class="s">&quot;</span><span class="si">%f</span><span class="s">oobar%&quot;</span><span class="p">))</span></pre></div>
</div>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
<li><strong>other</strong> &#8211; expression to be compared</li>
<li><strong>escape</strong> &#8211; <p>optional escape character, renders the <tt class="docutils literal"><span class="pre">ESCAPE</span></tt>
keyword, e.g.:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="n">somecolumn</span><span class="o">.</span><span class="n">ilike</span><span class="p">(</span><span class="s">&quot;foo/%bar&quot;</span><span class="p">,</span> <span class="n">escape</span><span class="o">=</span><span class="s">&quot;/&quot;</span><span class="p">)</span></pre></div>
</div>
</li>
</ul>
</td>
</tr>
</tbody>
</table>
<div class="admonition-see-also admonition seealso">
<p class="first admonition-title">See also</p>
<p class="last"><a class="reference internal" href="../core/expression_api.html#sqlalchemy.sql.operators.ColumnOperators.like" title="sqlalchemy.sql.operators.ColumnOperators.like"><tt class="xref py py-meth docutils literal"><span class="pre">ColumnOperators.like()</span></tt></a></p>
</div>
</dd></dl>

<dl class="method">
<dt id="sqlalchemy.orm.interfaces.PropComparator.in_">
<tt class="descname">in_</tt><big>(</big><em>other</em><big>)</big><a class="headerlink" href="#sqlalchemy.orm.interfaces.PropComparator.in_" title="Permalink to this definition">¶</a></dt>
<dd><div class="inherited-member container">
<em>inherited from the</em> <a class="reference internal" href="../core/expression_api.html#sqlalchemy.sql.operators.ColumnOperators.in_" title="sqlalchemy.sql.operators.ColumnOperators.in_"><tt class="xref py py-meth docutils literal"><span class="pre">in_()</span></tt></a> <em>method of</em> <a class="reference internal" href="../core/expression_api.html#sqlalchemy.sql.operators.ColumnOperators" title="sqlalchemy.sql.operators.ColumnOperators"><tt class="xref py py-class docutils literal"><span class="pre">ColumnOperators</span></tt></a></div>
<p>Implement the <tt class="docutils literal"><span class="pre">in</span></tt> operator.</p>
<p>In a column context, produces the clause <tt class="docutils literal"><span class="pre">a</span> <span class="pre">IN</span> <span class="pre">other</span></tt>.
&#8220;other&#8221; may be a tuple/list of column expressions,
or a <a class="reference internal" href="../core/expression_api.html#sqlalchemy.sql.expression.select" title="sqlalchemy.sql.expression.select"><tt class="xref py py-func docutils literal"><span class="pre">select()</span></tt></a> construct.</p>
</dd></dl>

<dl class="method">
<dt id="sqlalchemy.orm.interfaces.PropComparator.is_">
<tt class="descname">is_</tt><big>(</big><em>other</em><big>)</big><a class="headerlink" href="#sqlalchemy.orm.interfaces.PropComparator.is_" title="Permalink to this definition">¶</a></dt>
<dd><div class="inherited-member container">
<em>inherited from the</em> <a class="reference internal" href="../core/expression_api.html#sqlalchemy.sql.operators.ColumnOperators.is_" title="sqlalchemy.sql.operators.ColumnOperators.is_"><tt class="xref py py-meth docutils literal"><span class="pre">is_()</span></tt></a> <em>method of</em> <a class="reference internal" href="../core/expression_api.html#sqlalchemy.sql.operators.ColumnOperators" title="sqlalchemy.sql.operators.ColumnOperators"><tt class="xref py py-class docutils literal"><span class="pre">ColumnOperators</span></tt></a></div>
<p>Implement the <tt class="docutils literal"><span class="pre">IS</span></tt> operator.</p>
<p>Normally, <tt class="docutils literal"><span class="pre">IS</span></tt> is generated automatically when comparing to a
value of <tt class="docutils literal"><span class="pre">None</span></tt>, which resolves to <tt class="docutils literal"><span class="pre">NULL</span></tt>.  However, explicit
usage of <tt class="docutils literal"><span class="pre">IS</span></tt> may be desirable if comparing to boolean values
on certain platforms.</p>
<p class="versionadded">
<span class="versionmodified">New in version 0.7.9.</span></p>
<div class="admonition-see-also admonition seealso">
<p class="first admonition-title">See also</p>
<p class="last"><a class="reference internal" href="../core/expression_api.html#sqlalchemy.sql.operators.ColumnOperators.isnot" title="sqlalchemy.sql.operators.ColumnOperators.isnot"><tt class="xref py py-meth docutils literal"><span class="pre">ColumnOperators.isnot()</span></tt></a></p>
</div>
</dd></dl>

<dl class="method">
<dt id="sqlalchemy.orm.interfaces.PropComparator.isnot">
<tt class="descname">isnot</tt><big>(</big><em>other</em><big>)</big><a class="headerlink" href="#sqlalchemy.orm.interfaces.PropComparator.isnot" title="Permalink to this definition">¶</a></dt>
<dd><div class="inherited-member container">
<em>inherited from the</em> <a class="reference internal" href="../core/expression_api.html#sqlalchemy.sql.operators.ColumnOperators.isnot" title="sqlalchemy.sql.operators.ColumnOperators.isnot"><tt class="xref py py-meth docutils literal"><span class="pre">isnot()</span></tt></a> <em>method of</em> <a class="reference internal" href="../core/expression_api.html#sqlalchemy.sql.operators.ColumnOperators" title="sqlalchemy.sql.operators.ColumnOperators"><tt class="xref py py-class docutils literal"><span class="pre">ColumnOperators</span></tt></a></div>
<p>Implement the <tt class="docutils literal"><span class="pre">IS</span> <span class="pre">NOT</span></tt> operator.</p>
<p>Normally, <tt class="docutils literal"><span class="pre">IS</span> <span class="pre">NOT</span></tt> is generated automatically when comparing to a
value of <tt class="docutils literal"><span class="pre">None</span></tt>, which resolves to <tt class="docutils literal"><span class="pre">NULL</span></tt>.  However, explicit
usage of <tt class="docutils literal"><span class="pre">IS</span> <span class="pre">NOT</span></tt> may be desirable if comparing to boolean values
on certain platforms.</p>
<p class="versionadded">
<span class="versionmodified">New in version 0.7.9.</span></p>
<div class="admonition-see-also admonition seealso">
<p class="first admonition-title">See also</p>
<p class="last"><a class="reference internal" href="../core/expression_api.html#sqlalchemy.sql.operators.ColumnOperators.is_" title="sqlalchemy.sql.operators.ColumnOperators.is_"><tt class="xref py py-meth docutils literal"><span class="pre">ColumnOperators.is_()</span></tt></a></p>
</div>
</dd></dl>

<dl class="method">
<dt id="sqlalchemy.orm.interfaces.PropComparator.like">
<tt class="descname">like</tt><big>(</big><em>other</em>, <em>escape=None</em><big>)</big><a class="headerlink" href="#sqlalchemy.orm.interfaces.PropComparator.like" title="Permalink to this definition">¶</a></dt>
<dd><div class="inherited-member container">
<em>inherited from the</em> <a class="reference internal" href="../core/expression_api.html#sqlalchemy.sql.operators.ColumnOperators.like" title="sqlalchemy.sql.operators.ColumnOperators.like"><tt class="xref py py-meth docutils literal"><span class="pre">like()</span></tt></a> <em>method of</em> <a class="reference internal" href="../core/expression_api.html#sqlalchemy.sql.operators.ColumnOperators" title="sqlalchemy.sql.operators.ColumnOperators"><tt class="xref py py-class docutils literal"><span class="pre">ColumnOperators</span></tt></a></div>
<p>Implement the <tt class="docutils literal"><span class="pre">like</span></tt> operator.</p>
<p>In a column context, produces the clause <tt class="docutils literal"><span class="pre">a</span> <span class="pre">LIKE</span> <span class="pre">other</span></tt>.</p>
<p>E.g.:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="n">select</span><span class="p">([</span><span class="n">sometable</span><span class="p">])</span><span class="o">.</span><span class="n">where</span><span class="p">(</span><span class="n">sometable</span><span class="o">.</span><span class="n">c</span><span class="o">.</span><span class="n">column</span><span class="o">.</span><span class="n">like</span><span class="p">(</span><span class="s">&quot;</span><span class="si">%f</span><span class="s">oobar%&quot;</span><span class="p">))</span></pre></div>
</div>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
<li><strong>other</strong> &#8211; expression to be compared</li>
<li><strong>escape</strong> &#8211; <p>optional escape character, renders the <tt class="docutils literal"><span class="pre">ESCAPE</span></tt>
keyword, e.g.:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="n">somecolumn</span><span class="o">.</span><span class="n">like</span><span class="p">(</span><span class="s">&quot;foo/%bar&quot;</span><span class="p">,</span> <span class="n">escape</span><span class="o">=</span><span class="s">&quot;/&quot;</span><span class="p">)</span></pre></div>
</div>
</li>
</ul>
</td>
</tr>
</tbody>
</table>
<div class="admonition-see-also admonition seealso">
<p class="first admonition-title">See also</p>
<p class="last"><a class="reference internal" href="../core/expression_api.html#sqlalchemy.sql.operators.ColumnOperators.ilike" title="sqlalchemy.sql.operators.ColumnOperators.ilike"><tt class="xref py py-meth docutils literal"><span class="pre">ColumnOperators.ilike()</span></tt></a></p>
</div>
</dd></dl>

<dl class="method">
<dt id="sqlalchemy.orm.interfaces.PropComparator.match">
<tt class="descname">match</tt><big>(</big><em>other</em>, <em>**kwargs</em><big>)</big><a class="headerlink" href="#sqlalchemy.orm.interfaces.PropComparator.match" title="Permalink to this definition">¶</a></dt>
<dd><div class="inherited-member container">
<em>inherited from the</em> <a class="reference internal" href="../core/expression_api.html#sqlalchemy.sql.operators.ColumnOperators.match" title="sqlalchemy.sql.operators.ColumnOperators.match"><tt class="xref py py-meth docutils literal"><span class="pre">match()</span></tt></a> <em>method of</em> <a class="reference internal" href="../core/expression_api.html#sqlalchemy.sql.operators.ColumnOperators" title="sqlalchemy.sql.operators.ColumnOperators"><tt class="xref py py-class docutils literal"><span class="pre">ColumnOperators</span></tt></a></div>
<p>Implements the &#8216;match&#8217; operator.</p>
<p>In a column context, this produces a MATCH clause, i.e.
<tt class="docutils literal"><span class="pre">MATCH</span> <span class="pre">'&lt;other&gt;'</span></tt>.  The allowed contents of <tt class="docutils literal"><span class="pre">other</span></tt>
are database backend specific.</p>
</dd></dl>

<dl class="method">
<dt id="sqlalchemy.orm.interfaces.PropComparator.notilike">
<tt class="descname">notilike</tt><big>(</big><em>other</em>, <em>escape=None</em><big>)</big><a class="headerlink" href="#sqlalchemy.orm.interfaces.PropComparator.notilike" title="Permalink to this definition">¶</a></dt>
<dd><div class="inherited-member container">
<em>inherited from the</em> <a class="reference internal" href="../core/expression_api.html#sqlalchemy.sql.operators.ColumnOperators.notilike" title="sqlalchemy.sql.operators.ColumnOperators.notilike"><tt class="xref py py-meth docutils literal"><span class="pre">notilike()</span></tt></a> <em>method of</em> <a class="reference internal" href="../core/expression_api.html#sqlalchemy.sql.operators.ColumnOperators" title="sqlalchemy.sql.operators.ColumnOperators"><tt class="xref py py-class docutils literal"><span class="pre">ColumnOperators</span></tt></a></div>
<p>implement the <tt class="docutils literal"><span class="pre">NOT</span> <span class="pre">ILIKE</span></tt> operator.</p>
<p>This is equivalent to using negation with
<a class="reference internal" href="../core/expression_api.html#sqlalchemy.sql.operators.ColumnOperators.ilike" title="sqlalchemy.sql.operators.ColumnOperators.ilike"><tt class="xref py py-meth docutils literal"><span class="pre">ColumnOperators.ilike()</span></tt></a>, i.e. <tt class="docutils literal"><span class="pre">~x.ilike(y)</span></tt>.</p>
<p class="versionadded">
<span class="versionmodified">New in version 0.8.</span></p>
<div class="admonition-see-also admonition seealso">
<p class="first admonition-title">See also</p>
<p class="last"><a class="reference internal" href="../core/expression_api.html#sqlalchemy.sql.operators.ColumnOperators.ilike" title="sqlalchemy.sql.operators.ColumnOperators.ilike"><tt class="xref py py-meth docutils literal"><span class="pre">ColumnOperators.ilike()</span></tt></a></p>
</div>
</dd></dl>

<dl class="method">
<dt id="sqlalchemy.orm.interfaces.PropComparator.notin_">
<tt class="descname">notin_</tt><big>(</big><em>other</em><big>)</big><a class="headerlink" href="#sqlalchemy.orm.interfaces.PropComparator.notin_" title="Permalink to this definition">¶</a></dt>
<dd><div class="inherited-member container">
<em>inherited from the</em> <a class="reference internal" href="../core/expression_api.html#sqlalchemy.sql.operators.ColumnOperators.notin_" title="sqlalchemy.sql.operators.ColumnOperators.notin_"><tt class="xref py py-meth docutils literal"><span class="pre">notin_()</span></tt></a> <em>method of</em> <a class="reference internal" href="../core/expression_api.html#sqlalchemy.sql.operators.ColumnOperators" title="sqlalchemy.sql.operators.ColumnOperators"><tt class="xref py py-class docutils literal"><span class="pre">ColumnOperators</span></tt></a></div>
<p>implement the <tt class="docutils literal"><span class="pre">NOT</span> <span class="pre">IN</span></tt> operator.</p>
<p>This is equivalent to using negation with <a class="reference internal" href="../core/expression_api.html#sqlalchemy.sql.operators.ColumnOperators.in_" title="sqlalchemy.sql.operators.ColumnOperators.in_"><tt class="xref py py-meth docutils literal"><span class="pre">ColumnOperators.in_()</span></tt></a>,
i.e. <tt class="docutils literal"><span class="pre">~x.in_(y)</span></tt>.</p>
<p class="versionadded">
<span class="versionmodified">New in version 0.8.</span></p>
<div class="admonition-see-also admonition seealso">
<p class="first admonition-title">See also</p>
<p class="last"><a class="reference internal" href="../core/expression_api.html#sqlalchemy.sql.operators.ColumnOperators.in_" title="sqlalchemy.sql.operators.ColumnOperators.in_"><tt class="xref py py-meth docutils literal"><span class="pre">ColumnOperators.in_()</span></tt></a></p>
</div>
</dd></dl>

<dl class="method">
<dt id="sqlalchemy.orm.interfaces.PropComparator.notlike">
<tt class="descname">notlike</tt><big>(</big><em>other</em>, <em>escape=None</em><big>)</big><a class="headerlink" href="#sqlalchemy.orm.interfaces.PropComparator.notlike" title="Permalink to this definition">¶</a></dt>
<dd><div class="inherited-member container">
<em>inherited from the</em> <a class="reference internal" href="../core/expression_api.html#sqlalchemy.sql.operators.ColumnOperators.notlike" title="sqlalchemy.sql.operators.ColumnOperators.notlike"><tt class="xref py py-meth docutils literal"><span class="pre">notlike()</span></tt></a> <em>method of</em> <a class="reference internal" href="../core/expression_api.html#sqlalchemy.sql.operators.ColumnOperators" title="sqlalchemy.sql.operators.ColumnOperators"><tt class="xref py py-class docutils literal"><span class="pre">ColumnOperators</span></tt></a></div>
<p>implement the <tt class="docutils literal"><span class="pre">NOT</span> <span class="pre">LIKE</span></tt> operator.</p>
<p>This is equivalent to using negation with
<a class="reference internal" href="../core/expression_api.html#sqlalchemy.sql.operators.ColumnOperators.like" title="sqlalchemy.sql.operators.ColumnOperators.like"><tt class="xref py py-meth docutils literal"><span class="pre">ColumnOperators.like()</span></tt></a>, i.e. <tt class="docutils literal"><span class="pre">~x.like(y)</span></tt>.</p>
<p class="versionadded">
<span class="versionmodified">New in version 0.8.</span></p>
<div class="admonition-see-also admonition seealso">
<p class="first admonition-title">See also</p>
<p class="last"><a class="reference internal" href="../core/expression_api.html#sqlalchemy.sql.operators.ColumnOperators.like" title="sqlalchemy.sql.operators.ColumnOperators.like"><tt class="xref py py-meth docutils literal"><span class="pre">ColumnOperators.like()</span></tt></a></p>
</div>
</dd></dl>

<dl class="method">
<dt id="sqlalchemy.orm.interfaces.PropComparator.nullsfirst">
<tt class="descname">nullsfirst</tt><big>(</big><big>)</big><a class="headerlink" href="#sqlalchemy.orm.interfaces.PropComparator.nullsfirst" title="Permalink to this definition">¶</a></dt>
<dd><div class="inherited-member container">
<em>inherited from the</em> <a class="reference internal" href="../core/expression_api.html#sqlalchemy.sql.operators.ColumnOperators.nullsfirst" title="sqlalchemy.sql.operators.ColumnOperators.nullsfirst"><tt class="xref py py-meth docutils literal"><span class="pre">nullsfirst()</span></tt></a> <em>method of</em> <a class="reference internal" href="../core/expression_api.html#sqlalchemy.sql.operators.ColumnOperators" title="sqlalchemy.sql.operators.ColumnOperators"><tt class="xref py py-class docutils literal"><span class="pre">ColumnOperators</span></tt></a></div>
<p>Produce a <a class="reference internal" href="../core/expression_api.html#sqlalchemy.sql.expression.nullsfirst" title="sqlalchemy.sql.expression.nullsfirst"><tt class="xref py py-func docutils literal"><span class="pre">nullsfirst()</span></tt></a> clause against the
parent object.</p>
</dd></dl>

<dl class="method">
<dt id="sqlalchemy.orm.interfaces.PropComparator.nullslast">
<tt class="descname">nullslast</tt><big>(</big><big>)</big><a class="headerlink" href="#sqlalchemy.orm.interfaces.PropComparator.nullslast" title="Permalink to this definition">¶</a></dt>
<dd><div class="inherited-member container">
<em>inherited from the</em> <a class="reference internal" href="../core/expression_api.html#sqlalchemy.sql.operators.ColumnOperators.nullslast" title="sqlalchemy.sql.operators.ColumnOperators.nullslast"><tt class="xref py py-meth docutils literal"><span class="pre">nullslast()</span></tt></a> <em>method of</em> <a class="reference internal" href="../core/expression_api.html#sqlalchemy.sql.operators.ColumnOperators" title="sqlalchemy.sql.operators.ColumnOperators"><tt class="xref py py-class docutils literal"><span class="pre">ColumnOperators</span></tt></a></div>
<p>Produce a <a class="reference internal" href="../core/expression_api.html#sqlalchemy.sql.expression.nullslast" title="sqlalchemy.sql.expression.nullslast"><tt class="xref py py-func docutils literal"><span class="pre">nullslast()</span></tt></a> clause against the
parent object.</p>
</dd></dl>

<dl class="method">
<dt id="sqlalchemy.orm.interfaces.PropComparator.of_type">
<tt class="descname">of_type</tt><big>(</big><em>class_</em><big>)</big><a class="headerlink" href="#sqlalchemy.orm.interfaces.PropComparator.of_type" title="Permalink to this definition">¶</a></dt>
<dd><p>Redefine this object in terms of a polymorphic subclass.</p>
<p>Returns a new PropComparator from which further criterion can be
evaluated.</p>
<p>e.g.:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="n">query</span><span class="o">.</span><span class="n">join</span><span class="p">(</span><span class="n">Company</span><span class="o">.</span><span class="n">employees</span><span class="o">.</span><span class="n">of_type</span><span class="p">(</span><span class="n">Engineer</span><span class="p">))</span><span class="o">.</span>\
   <span class="nb">filter</span><span class="p">(</span><span class="n">Engineer</span><span class="o">.</span><span class="n">name</span><span class="o">==</span><span class="s">&#39;foo&#39;</span><span class="p">)</span></pre></div>
</div>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><strong>class_</strong> &#8211; a class or mapper indicating that criterion will be
against this specific subclass.</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="sqlalchemy.orm.interfaces.PropComparator.op">
<tt class="descname">op</tt><big>(</big><em>opstring</em>, <em>precedence=0</em><big>)</big><a class="headerlink" href="#sqlalchemy.orm.interfaces.PropComparator.op" title="Permalink to this definition">¶</a></dt>
<dd><div class="inherited-member container">
<em>inherited from the</em> <a class="reference internal" href="../core/expression_api.html#sqlalchemy.sql.operators.Operators.op" title="sqlalchemy.sql.operators.Operators.op"><tt class="xref py py-meth docutils literal"><span class="pre">op()</span></tt></a> <em>method of</em> <a class="reference internal" href="../core/expression_api.html#sqlalchemy.sql.operators.Operators" title="sqlalchemy.sql.operators.Operators"><tt class="xref py py-class docutils literal"><span class="pre">Operators</span></tt></a></div>
<p>produce a generic operator function.</p>
<p>e.g.:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="n">somecolumn</span><span class="o">.</span><span class="n">op</span><span class="p">(</span><span class="s">&quot;*&quot;</span><span class="p">)(</span><span class="mi">5</span><span class="p">)</span></pre></div>
</div>
<p>produces:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="n">somecolumn</span> <span class="o">*</span> <span class="mi">5</span></pre></div>
</div>
<p>This function can also be used to make bitwise operators explicit. For
example:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="n">somecolumn</span><span class="o">.</span><span class="n">op</span><span class="p">(</span><span class="s">&#39;&amp;&#39;</span><span class="p">)(</span><span class="mh">0xff</span><span class="p">)</span></pre></div>
</div>
<p>is a bitwise AND of the value in <tt class="docutils literal"><span class="pre">somecolumn</span></tt>.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
<li><strong>operator</strong> &#8211; a string which will be output as the infix operator
between this element and the expression passed to the
generated function.</li>
<li><strong>precedence</strong> &#8211; <p>precedence to apply to the operator, when
parenthesizing expressions.  A lower number will cause the expression
to be parenthesized when applied against another operator with
higher precedence.  The default value of <tt class="docutils literal"><span class="pre">0</span></tt> is lower than all
operators except for the comma (<tt class="docutils literal"><span class="pre">,</span></tt>) and <tt class="docutils literal"><span class="pre">AS</span></tt> operators.
A value of 100 will be higher or equal to all operators, and -100
will be lower than or equal to all operators.</p>
<p class="versionadded">
<span class="versionmodified">New in version 0.8: </span>- added the &#8216;precedence&#8217; argument.</p>
</li>
</ul>
</td>
</tr>
</tbody>
</table>
<div class="admonition-see-also admonition seealso">
<p class="first admonition-title">See also</p>
<p class="last"><a class="reference internal" href="../core/types.html#types-operators"><em>Redefining and Creating New Operators</em></a></p>
</div>
</dd></dl>

<dl class="method">
<dt id="sqlalchemy.orm.interfaces.PropComparator.operate">
<tt class="descname">operate</tt><big>(</big><em>op</em>, <em>*other</em>, <em>**kwargs</em><big>)</big><a class="headerlink" href="#sqlalchemy.orm.interfaces.PropComparator.operate" title="Permalink to this definition">¶</a></dt>
<dd><div class="inherited-member container">
<em>inherited from the</em> <a class="reference internal" href="../core/expression_api.html#sqlalchemy.sql.operators.Operators.operate" title="sqlalchemy.sql.operators.Operators.operate"><tt class="xref py py-meth docutils literal"><span class="pre">operate()</span></tt></a> <em>method of</em> <a class="reference internal" href="../core/expression_api.html#sqlalchemy.sql.operators.Operators" title="sqlalchemy.sql.operators.Operators"><tt class="xref py py-class docutils literal"><span class="pre">Operators</span></tt></a></div>
<p>Operate on an argument.</p>
<p>This is the lowest level of operation, raises
<tt class="xref py py-class docutils literal"><span class="pre">NotImplementedError</span></tt> by default.</p>
<p>Overriding this on a subclass can allow common
behavior to be applied to all operations.
For example, overriding <a class="reference internal" href="../core/expression_api.html#sqlalchemy.sql.operators.ColumnOperators" title="sqlalchemy.sql.operators.ColumnOperators"><tt class="xref py py-class docutils literal"><span class="pre">ColumnOperators</span></tt></a>
to apply <tt class="docutils literal"><span class="pre">func.lower()</span></tt> to the left and right
side:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="k">class</span> <span class="nc">MyComparator</span><span class="p">(</span><span class="n">ColumnOperators</span><span class="p">):</span>
    <span class="k">def</span> <span class="nf">operate</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">op</span><span class="p">,</span> <span class="n">other</span><span class="p">):</span>
        <span class="k">return</span> <span class="n">op</span><span class="p">(</span><span class="n">func</span><span class="o">.</span><span class="n">lower</span><span class="p">(</span><span class="bp">self</span><span class="p">),</span> <span class="n">func</span><span class="o">.</span><span class="n">lower</span><span class="p">(</span><span class="n">other</span><span class="p">))</span></pre></div>
</div>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
<li><strong>op</strong> &#8211; Operator callable.</li>
<li><strong>*other</strong> &#8211; the &#8216;other&#8217; side of the operation. Will
be a single scalar for most operations.</li>
<li><strong>**kwargs</strong> &#8211; modifiers.  These may be passed by special
operators such as <tt class="xref py py-meth docutils literal"><span class="pre">ColumnOperators.contains()</span></tt>.</li>
</ul>
</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="sqlalchemy.orm.interfaces.PropComparator.reverse_operate">
<tt class="descname">reverse_operate</tt><big>(</big><em>op</em>, <em>other</em>, <em>**kwargs</em><big>)</big><a class="headerlink" href="#sqlalchemy.orm.interfaces.PropComparator.reverse_operate" title="Permalink to this definition">¶</a></dt>
<dd><div class="inherited-member container">
<em>inherited from the</em> <a class="reference internal" href="../core/expression_api.html#sqlalchemy.sql.operators.Operators.reverse_operate" title="sqlalchemy.sql.operators.Operators.reverse_operate"><tt class="xref py py-meth docutils literal"><span class="pre">reverse_operate()</span></tt></a> <em>method of</em> <a class="reference internal" href="../core/expression_api.html#sqlalchemy.sql.operators.Operators" title="sqlalchemy.sql.operators.Operators"><tt class="xref py py-class docutils literal"><span class="pre">Operators</span></tt></a></div>
<p>Reverse operate on an argument.</p>
<p>Usage is the same as <tt class="xref py py-meth docutils literal"><span class="pre">operate()</span></tt>.</p>
</dd></dl>

<dl class="method">
<dt id="sqlalchemy.orm.interfaces.PropComparator.startswith">
<tt class="descname">startswith</tt><big>(</big><em>other</em>, <em>**kwargs</em><big>)</big><a class="headerlink" href="#sqlalchemy.orm.interfaces.PropComparator.startswith" title="Permalink to this definition">¶</a></dt>
<dd><div class="inherited-member container">
<em>inherited from the</em> <a class="reference internal" href="../core/expression_api.html#sqlalchemy.sql.operators.ColumnOperators.startswith" title="sqlalchemy.sql.operators.ColumnOperators.startswith"><tt class="xref py py-meth docutils literal"><span class="pre">startswith()</span></tt></a> <em>method of</em> <a class="reference internal" href="../core/expression_api.html#sqlalchemy.sql.operators.ColumnOperators" title="sqlalchemy.sql.operators.ColumnOperators"><tt class="xref py py-class docutils literal"><span class="pre">ColumnOperators</span></tt></a></div>
<p>Implement the <tt class="docutils literal"><span class="pre">startwith</span></tt> operator.</p>
<p>In a column context, produces the clause <tt class="docutils literal"><span class="pre">LIKE</span> <span class="pre">'&lt;other&gt;%'</span></tt></p>
</dd></dl>

</dd></dl>

<dl class="class">
<dt id="sqlalchemy.orm.properties.RelationshipProperty">
<em class="property">class </em><tt class="descclassname">sqlalchemy.orm.properties.</tt><tt class="descname">RelationshipProperty</tt><big>(</big><em>argument</em>, <em>secondary=None</em>, <em>primaryjoin=None</em>, <em>secondaryjoin=None</em>, <em>foreign_keys=None</em>, <em>uselist=None</em>, <em>order_by=False</em>, <em>backref=None</em>, <em>back_populates=None</em>, <em>post_update=False</em>, <em>cascade=False</em>, <em>extension=None</em>, <em>viewonly=False</em>, <em>lazy=True</em>, <em>collection_class=None</em>, <em>passive_deletes=False</em>, <em>passive_updates=True</em>, <em>remote_side=None</em>, <em>enable_typechecks=True</em>, <em>join_depth=None</em>, <em>comparator_factory=None</em>, <em>single_parent=False</em>, <em>innerjoin=False</em>, <em>doc=None</em>, <em>active_history=False</em>, <em>cascade_backrefs=True</em>, <em>load_on_pending=False</em>, <em>strategy_class=None</em>, <em>_local_remote_pairs=None</em>, <em>query_class=None</em>, <em>info=None</em><big>)</big><a class="headerlink" href="#sqlalchemy.orm.properties.RelationshipProperty" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <tt class="xref py py-class docutils literal"><span class="pre">sqlalchemy.orm.interfaces.StrategizedProperty</span></tt></p>
<p>Describes an object property that holds a single item or list
of items that correspond to a related database table.</p>
<p>Public constructor is the <a class="reference internal" href="relationships.html#sqlalchemy.orm.relationship" title="sqlalchemy.orm.relationship"><tt class="xref py py-func docutils literal"><span class="pre">orm.relationship()</span></tt></a> function.</p>
<p>See also:</p>
<p><a class="reference internal" href="relationships.html"><em>Relationship Configuration</em></a></p>
<dl class="class">
<dt id="sqlalchemy.orm.properties.RelationshipProperty.Comparator">
<em class="property">class </em><tt class="descname">Comparator</tt><big>(</big><em>prop</em>, <em>parentmapper</em>, <em>of_type=None</em>, <em>adapter=None</em><big>)</big><a class="headerlink" href="#sqlalchemy.orm.properties.RelationshipProperty.Comparator" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <a class="reference internal" href="#sqlalchemy.orm.interfaces.PropComparator" title="sqlalchemy.orm.interfaces.PropComparator"><tt class="xref py py-class docutils literal"><span class="pre">sqlalchemy.orm.interfaces.PropComparator</span></tt></a></p>
<p>Produce boolean, comparison, and other operators for
<a class="reference internal" href="#sqlalchemy.orm.properties.RelationshipProperty" title="sqlalchemy.orm.properties.RelationshipProperty"><tt class="xref py py-class docutils literal"><span class="pre">RelationshipProperty</span></tt></a> attributes.</p>
<p>See the documentation for <a class="reference internal" href="#sqlalchemy.orm.interfaces.PropComparator" title="sqlalchemy.orm.interfaces.PropComparator"><tt class="xref py py-class docutils literal"><span class="pre">PropComparator</span></tt></a> for a brief overview
of ORM level operator definition.</p>
<p>See also:</p>
<p><a class="reference internal" href="#sqlalchemy.orm.interfaces.PropComparator" title="sqlalchemy.orm.interfaces.PropComparator"><tt class="xref py py-class docutils literal"><span class="pre">PropComparator</span></tt></a></p>
<p><a class="reference internal" href="#sqlalchemy.orm.properties.ColumnProperty.Comparator" title="sqlalchemy.orm.properties.ColumnProperty.Comparator"><tt class="xref py py-class docutils literal"><span class="pre">ColumnProperty.Comparator</span></tt></a></p>
<p><a class="reference internal" href="../core/expression_api.html#sqlalchemy.sql.operators.ColumnOperators" title="sqlalchemy.sql.operators.ColumnOperators"><tt class="xref py py-class docutils literal"><span class="pre">ColumnOperators</span></tt></a></p>
<p><a class="reference internal" href="../core/types.html#types-operators"><em>Redefining and Creating New Operators</em></a></p>
<p><a class="reference internal" href="../core/types.html#sqlalchemy.types.TypeEngine.comparator_factory" title="sqlalchemy.types.TypeEngine.comparator_factory"><tt class="xref py py-attr docutils literal"><span class="pre">TypeEngine.comparator_factory</span></tt></a></p>
<dl class="method">
<dt id="sqlalchemy.orm.properties.RelationshipProperty.Comparator.__eq__">
<tt class="descname">__eq__</tt><big>(</big><em>other</em><big>)</big><a class="headerlink" href="#sqlalchemy.orm.properties.RelationshipProperty.Comparator.__eq__" title="Permalink to this definition">¶</a></dt>
<dd><p>Implement the <tt class="docutils literal"><span class="pre">==</span></tt> operator.</p>
<p>In a many-to-one context, such as:</p>
<div class="highlight-python"><pre>MyClass.some_prop == &lt;some object&gt;</pre>
</div>
<p>this will typically produce a
clause such as:</p>
<div class="highlight-python"><pre>mytable.related_id == &lt;some id&gt;</pre>
</div>
<p>Where <tt class="docutils literal"><span class="pre">&lt;some</span> <span class="pre">id&gt;</span></tt> is the primary key of the given
object.</p>
<p>The <tt class="docutils literal"><span class="pre">==</span></tt> operator provides partial functionality for non-
many-to-one comparisons:</p>
<ul class="simple">
<li>Comparisons against collections are not supported.
Use <a class="reference internal" href="#sqlalchemy.orm.properties.RelationshipProperty.Comparator.contains" title="sqlalchemy.orm.properties.RelationshipProperty.Comparator.contains"><tt class="xref py py-meth docutils literal"><span class="pre">contains()</span></tt></a>.</li>
<li>Compared to a scalar one-to-many, will produce a
clause that compares the target columns in the parent to
the given target.</li>
<li>Compared to a scalar many-to-many, an alias
of the association table will be rendered as
well, forming a natural join that is part of the
main body of the query. This will not work for
queries that go beyond simple AND conjunctions of
comparisons, such as those which use OR. Use
explicit joins, outerjoins, or
<a class="reference internal" href="#sqlalchemy.orm.properties.RelationshipProperty.Comparator.has" title="sqlalchemy.orm.properties.RelationshipProperty.Comparator.has"><tt class="xref py py-meth docutils literal"><span class="pre">has()</span></tt></a> for
more comprehensive non-many-to-one scalar
membership tests.</li>
<li>Comparisons against <tt class="docutils literal"><span class="pre">None</span></tt> given in a one-to-many
or many-to-many context produce a NOT EXISTS clause.</li>
</ul>
</dd></dl>

<dl class="method">
<dt id="sqlalchemy.orm.properties.RelationshipProperty.Comparator.__init__">
<tt class="descname">__init__</tt><big>(</big><em>prop</em>, <em>parentmapper</em>, <em>of_type=None</em>, <em>adapter=None</em><big>)</big><a class="headerlink" href="#sqlalchemy.orm.properties.RelationshipProperty.Comparator.__init__" title="Permalink to this definition">¶</a></dt>
<dd><p>Construction of <a class="reference internal" href="#sqlalchemy.orm.properties.RelationshipProperty.Comparator" title="sqlalchemy.orm.properties.RelationshipProperty.Comparator"><tt class="xref py py-class docutils literal"><span class="pre">RelationshipProperty.Comparator</span></tt></a>
is internal to the ORM&#8217;s attribute mechanics.</p>
</dd></dl>

<dl class="method">
<dt id="sqlalchemy.orm.properties.RelationshipProperty.Comparator.__le__">
<tt class="descname">__le__</tt><big>(</big><em>other</em><big>)</big><a class="headerlink" href="#sqlalchemy.orm.properties.RelationshipProperty.Comparator.__le__" title="Permalink to this definition">¶</a></dt>
<dd><div class="inherited-member container">
<em>inherited from the</em> <a class="reference internal" href="../core/expression_api.html#sqlalchemy.sql.operators.ColumnOperators.__le__" title="sqlalchemy.sql.operators.ColumnOperators.__le__"><tt class="xref py py-meth docutils literal"><span class="pre">__le__()</span></tt></a> <em>method of</em> <a class="reference internal" href="../core/expression_api.html#sqlalchemy.sql.operators.ColumnOperators" title="sqlalchemy.sql.operators.ColumnOperators"><tt class="xref py py-class docutils literal"><span class="pre">ColumnOperators</span></tt></a></div>
<p>Implement the <tt class="docutils literal"><span class="pre">&lt;=</span></tt> operator.</p>
<p>In a column context, produces the clause <tt class="docutils literal"><span class="pre">a</span> <span class="pre">&lt;=</span> <span class="pre">b</span></tt>.</p>
</dd></dl>

<dl class="method">
<dt id="sqlalchemy.orm.properties.RelationshipProperty.Comparator.__lt__">
<tt class="descname">__lt__</tt><big>(</big><em>other</em><big>)</big><a class="headerlink" href="#sqlalchemy.orm.properties.RelationshipProperty.Comparator.__lt__" title="Permalink to this definition">¶</a></dt>
<dd><div class="inherited-member container">
<em>inherited from the</em> <a class="reference internal" href="../core/expression_api.html#sqlalchemy.sql.operators.ColumnOperators.__lt__" title="sqlalchemy.sql.operators.ColumnOperators.__lt__"><tt class="xref py py-meth docutils literal"><span class="pre">__lt__()</span></tt></a> <em>method of</em> <a class="reference internal" href="../core/expression_api.html#sqlalchemy.sql.operators.ColumnOperators" title="sqlalchemy.sql.operators.ColumnOperators"><tt class="xref py py-class docutils literal"><span class="pre">ColumnOperators</span></tt></a></div>
<p>Implement the <tt class="docutils literal"><span class="pre">&lt;</span></tt> operator.</p>
<p>In a column context, produces the clause <tt class="docutils literal"><span class="pre">a</span> <span class="pre">&lt;</span> <span class="pre">b</span></tt>.</p>
</dd></dl>

<dl class="method">
<dt id="sqlalchemy.orm.properties.RelationshipProperty.Comparator.__ne__">
<tt class="descname">__ne__</tt><big>(</big><em>other</em><big>)</big><a class="headerlink" href="#sqlalchemy.orm.properties.RelationshipProperty.Comparator.__ne__" title="Permalink to this definition">¶</a></dt>
<dd><p>Implement the <tt class="docutils literal"><span class="pre">!=</span></tt> operator.</p>
<p>In a many-to-one context, such as:</p>
<div class="highlight-python"><pre>MyClass.some_prop != &lt;some object&gt;</pre>
</div>
<p>This will typically produce a clause such as:</p>
<div class="highlight-python"><pre>mytable.related_id != &lt;some id&gt;</pre>
</div>
<p>Where <tt class="docutils literal"><span class="pre">&lt;some</span> <span class="pre">id&gt;</span></tt> is the primary key of the
given object.</p>
<p>The <tt class="docutils literal"><span class="pre">!=</span></tt> operator provides partial functionality for non-
many-to-one comparisons:</p>
<ul class="simple">
<li>Comparisons against collections are not supported.
Use
<a class="reference internal" href="#sqlalchemy.orm.properties.RelationshipProperty.Comparator.contains" title="sqlalchemy.orm.properties.RelationshipProperty.Comparator.contains"><tt class="xref py py-meth docutils literal"><span class="pre">contains()</span></tt></a>
in conjunction with <a class="reference internal" href="../core/expression_api.html#sqlalchemy.sql.expression.not_" title="sqlalchemy.sql.expression.not_"><tt class="xref py py-func docutils literal"><span class="pre">not_()</span></tt></a>.</li>
<li>Compared to a scalar one-to-many, will produce a
clause that compares the target columns in the parent to
the given target.</li>
<li>Compared to a scalar many-to-many, an alias
of the association table will be rendered as
well, forming a natural join that is part of the
main body of the query. This will not work for
queries that go beyond simple AND conjunctions of
comparisons, such as those which use OR. Use
explicit joins, outerjoins, or
<a class="reference internal" href="#sqlalchemy.orm.properties.RelationshipProperty.Comparator.has" title="sqlalchemy.orm.properties.RelationshipProperty.Comparator.has"><tt class="xref py py-meth docutils literal"><span class="pre">has()</span></tt></a> in
conjunction with <a class="reference internal" href="../core/expression_api.html#sqlalchemy.sql.expression.not_" title="sqlalchemy.sql.expression.not_"><tt class="xref py py-func docutils literal"><span class="pre">not_()</span></tt></a> for
more comprehensive non-many-to-one scalar
membership tests.</li>
<li>Comparisons against <tt class="docutils literal"><span class="pre">None</span></tt> given in a one-to-many
or many-to-many context produce an EXISTS clause.</li>
</ul>
</dd></dl>

<dl class="method">
<dt id="sqlalchemy.orm.properties.RelationshipProperty.Comparator.adapted">
<tt class="descname">adapted</tt><big>(</big><em>adapter</em><big>)</big><a class="headerlink" href="#sqlalchemy.orm.properties.RelationshipProperty.Comparator.adapted" title="Permalink to this definition">¶</a></dt>
<dd><p>Return a copy of this PropComparator which will use the
given adaption function on the local side of generated
expressions.</p>
</dd></dl>

<dl class="method">
<dt id="sqlalchemy.orm.properties.RelationshipProperty.Comparator.any">
<tt class="descname">any</tt><big>(</big><em>criterion=None</em>, <em>**kwargs</em><big>)</big><a class="headerlink" href="#sqlalchemy.orm.properties.RelationshipProperty.Comparator.any" title="Permalink to this definition">¶</a></dt>
<dd><p>Produce an expression that tests a collection against
particular criterion, using EXISTS.</p>
<p>An expression like:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="n">session</span><span class="o">.</span><span class="n">query</span><span class="p">(</span><span class="n">MyClass</span><span class="p">)</span><span class="o">.</span><span class="n">filter</span><span class="p">(</span>
    <span class="n">MyClass</span><span class="o">.</span><span class="n">somereference</span><span class="o">.</span><span class="n">any</span><span class="p">(</span><span class="n">SomeRelated</span><span class="o">.</span><span class="n">x</span><span class="o">==</span><span class="mi">2</span><span class="p">)</span>
<span class="p">)</span></pre></div>
</div>
<p>Will produce a query like:</p>
<div class="highlight-python"><pre>SELECT * FROM my_table WHERE
EXISTS (SELECT 1 FROM related WHERE related.my_id=my_table.id
AND related.x=2)</pre>
</div>
<p>Because <a class="reference internal" href="#sqlalchemy.orm.properties.RelationshipProperty.Comparator.any" title="sqlalchemy.orm.properties.RelationshipProperty.Comparator.any"><tt class="xref py py-meth docutils literal"><span class="pre">any()</span></tt></a> uses
a correlated subquery, its performance is not nearly as
good when compared against large target tables as that of
using a join.</p>
<p><a class="reference internal" href="#sqlalchemy.orm.properties.RelationshipProperty.Comparator.any" title="sqlalchemy.orm.properties.RelationshipProperty.Comparator.any"><tt class="xref py py-meth docutils literal"><span class="pre">any()</span></tt></a> is particularly
useful for testing for empty collections:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="n">session</span><span class="o">.</span><span class="n">query</span><span class="p">(</span><span class="n">MyClass</span><span class="p">)</span><span class="o">.</span><span class="n">filter</span><span class="p">(</span>
    <span class="o">~</span><span class="n">MyClass</span><span class="o">.</span><span class="n">somereference</span><span class="o">.</span><span class="n">any</span><span class="p">()</span>
<span class="p">)</span></pre></div>
</div>
<p>will produce:</p>
<div class="highlight-python"><pre>SELECT * FROM my_table WHERE
NOT EXISTS (SELECT 1 FROM related WHERE
related.my_id=my_table.id)</pre>
</div>
<p><a class="reference internal" href="#sqlalchemy.orm.properties.RelationshipProperty.Comparator.any" title="sqlalchemy.orm.properties.RelationshipProperty.Comparator.any"><tt class="xref py py-meth docutils literal"><span class="pre">any()</span></tt></a> is only
valid for collections, i.e. a <a class="reference internal" href="relationships.html#sqlalchemy.orm.relationship" title="sqlalchemy.orm.relationship"><tt class="xref py py-func docutils literal"><span class="pre">relationship()</span></tt></a>
that has <tt class="docutils literal"><span class="pre">uselist=True</span></tt>.  For scalar references,
use <a class="reference internal" href="#sqlalchemy.orm.properties.RelationshipProperty.Comparator.has" title="sqlalchemy.orm.properties.RelationshipProperty.Comparator.has"><tt class="xref py py-meth docutils literal"><span class="pre">has()</span></tt></a>.</p>
</dd></dl>

<dl class="method">
<dt id="sqlalchemy.orm.properties.RelationshipProperty.Comparator.asc">
<tt class="descname">asc</tt><big>(</big><big>)</big><a class="headerlink" href="#sqlalchemy.orm.properties.RelationshipProperty.Comparator.asc" title="Permalink to this definition">¶</a></dt>
<dd><div class="inherited-member container">
<em>inherited from the</em> <a class="reference internal" href="../core/expression_api.html#sqlalchemy.sql.operators.ColumnOperators.asc" title="sqlalchemy.sql.operators.ColumnOperators.asc"><tt class="xref py py-meth docutils literal"><span class="pre">asc()</span></tt></a> <em>method of</em> <a class="reference internal" href="../core/expression_api.html#sqlalchemy.sql.operators.ColumnOperators" title="sqlalchemy.sql.operators.ColumnOperators"><tt class="xref py py-class docutils literal"><span class="pre">ColumnOperators</span></tt></a></div>
<p>Produce a <a class="reference internal" href="../core/expression_api.html#sqlalchemy.sql.expression.asc" title="sqlalchemy.sql.expression.asc"><tt class="xref py py-func docutils literal"><span class="pre">asc()</span></tt></a> clause against the
parent object.</p>
</dd></dl>

<dl class="method">
<dt id="sqlalchemy.orm.properties.RelationshipProperty.Comparator.between">
<tt class="descname">between</tt><big>(</big><em>cleft</em>, <em>cright</em><big>)</big><a class="headerlink" href="#sqlalchemy.orm.properties.RelationshipProperty.Comparator.between" title="Permalink to this definition">¶</a></dt>
<dd><div class="inherited-member container">
<em>inherited from the</em> <a class="reference internal" href="../core/expression_api.html#sqlalchemy.sql.operators.ColumnOperators.between" title="sqlalchemy.sql.operators.ColumnOperators.between"><tt class="xref py py-meth docutils literal"><span class="pre">between()</span></tt></a> <em>method of</em> <a class="reference internal" href="../core/expression_api.html#sqlalchemy.sql.operators.ColumnOperators" title="sqlalchemy.sql.operators.ColumnOperators"><tt class="xref py py-class docutils literal"><span class="pre">ColumnOperators</span></tt></a></div>
<p>Produce a <a class="reference internal" href="../core/expression_api.html#sqlalchemy.sql.expression.between" title="sqlalchemy.sql.expression.between"><tt class="xref py py-func docutils literal"><span class="pre">between()</span></tt></a> clause against
the parent object, given the lower and upper range.</p>
</dd></dl>

<dl class="method">
<dt id="sqlalchemy.orm.properties.RelationshipProperty.Comparator.collate">
<tt class="descname">collate</tt><big>(</big><em>collation</em><big>)</big><a class="headerlink" href="#sqlalchemy.orm.properties.RelationshipProperty.Comparator.collate" title="Permalink to this definition">¶</a></dt>
<dd><div class="inherited-member container">
<em>inherited from the</em> <a class="reference internal" href="../core/expression_api.html#sqlalchemy.sql.operators.ColumnOperators.collate" title="sqlalchemy.sql.operators.ColumnOperators.collate"><tt class="xref py py-meth docutils literal"><span class="pre">collate()</span></tt></a> <em>method of</em> <a class="reference internal" href="../core/expression_api.html#sqlalchemy.sql.operators.ColumnOperators" title="sqlalchemy.sql.operators.ColumnOperators"><tt class="xref py py-class docutils literal"><span class="pre">ColumnOperators</span></tt></a></div>
<p>Produce a <a class="reference internal" href="../core/expression_api.html#sqlalchemy.sql.expression.collate" title="sqlalchemy.sql.expression.collate"><tt class="xref py py-func docutils literal"><span class="pre">collate()</span></tt></a> clause against
the parent object, given the collation string.</p>
</dd></dl>

<dl class="method">
<dt id="sqlalchemy.orm.properties.RelationshipProperty.Comparator.concat">
<tt class="descname">concat</tt><big>(</big><em>other</em><big>)</big><a class="headerlink" href="#sqlalchemy.orm.properties.RelationshipProperty.Comparator.concat" title="Permalink to this definition">¶</a></dt>
<dd><div class="inherited-member container">
<em>inherited from the</em> <a class="reference internal" href="../core/expression_api.html#sqlalchemy.sql.operators.ColumnOperators.concat" title="sqlalchemy.sql.operators.ColumnOperators.concat"><tt class="xref py py-meth docutils literal"><span class="pre">concat()</span></tt></a> <em>method of</em> <a class="reference internal" href="../core/expression_api.html#sqlalchemy.sql.operators.ColumnOperators" title="sqlalchemy.sql.operators.ColumnOperators"><tt class="xref py py-class docutils literal"><span class="pre">ColumnOperators</span></tt></a></div>
<p>Implement the &#8216;concat&#8217; operator.</p>
<p>In a column context, produces the clause <tt class="docutils literal"><span class="pre">a</span> <span class="pre">||</span> <span class="pre">b</span></tt>,
or uses the <tt class="docutils literal"><span class="pre">concat()</span></tt> operator on MySQL.</p>
</dd></dl>

<dl class="method">
<dt id="sqlalchemy.orm.properties.RelationshipProperty.Comparator.contains">
<tt class="descname">contains</tt><big>(</big><em>other</em>, <em>**kwargs</em><big>)</big><a class="headerlink" href="#sqlalchemy.orm.properties.RelationshipProperty.Comparator.contains" title="Permalink to this definition">¶</a></dt>
<dd><p>Return a simple expression that tests a collection for
containment of a particular item.</p>
<p><a class="reference internal" href="#sqlalchemy.orm.properties.RelationshipProperty.Comparator.contains" title="sqlalchemy.orm.properties.RelationshipProperty.Comparator.contains"><tt class="xref py py-meth docutils literal"><span class="pre">contains()</span></tt></a> is
only valid for a collection, i.e. a
<a class="reference internal" href="relationships.html#sqlalchemy.orm.relationship" title="sqlalchemy.orm.relationship"><tt class="xref py py-func docutils literal"><span class="pre">relationship()</span></tt></a> that implements
one-to-many or many-to-many with <tt class="docutils literal"><span class="pre">uselist=True</span></tt>.</p>
<p>When used in a simple one-to-many context, an
expression like:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="n">MyClass</span><span class="o">.</span><span class="n">contains</span><span class="p">(</span><span class="n">other</span><span class="p">)</span></pre></div>
</div>
<p>Produces a clause like:</p>
<div class="highlight-python"><pre>mytable.id == &lt;some id&gt;</pre>
</div>
<p>Where <tt class="docutils literal"><span class="pre">&lt;some</span> <span class="pre">id&gt;</span></tt> is the value of the foreign key
attribute on <tt class="docutils literal"><span class="pre">other</span></tt> which refers to the primary
key of its parent object. From this it follows that
<a class="reference internal" href="#sqlalchemy.orm.properties.RelationshipProperty.Comparator.contains" title="sqlalchemy.orm.properties.RelationshipProperty.Comparator.contains"><tt class="xref py py-meth docutils literal"><span class="pre">contains()</span></tt></a> is
very useful when used with simple one-to-many
operations.</p>
<p>For many-to-many operations, the behavior of
<a class="reference internal" href="#sqlalchemy.orm.properties.RelationshipProperty.Comparator.contains" title="sqlalchemy.orm.properties.RelationshipProperty.Comparator.contains"><tt class="xref py py-meth docutils literal"><span class="pre">contains()</span></tt></a>
has more caveats. The association table will be
rendered in the statement, producing an &#8220;implicit&#8221;
join, that is, includes multiple tables in the FROM
clause which are equated in the WHERE clause:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="n">query</span><span class="p">(</span><span class="n">MyClass</span><span class="p">)</span><span class="o">.</span><span class="n">filter</span><span class="p">(</span><span class="n">MyClass</span><span class="o">.</span><span class="n">contains</span><span class="p">(</span><span class="n">other</span><span class="p">))</span></pre></div>
</div>
<p>Produces a query like:</p>
<div class="highlight-python"><pre>SELECT * FROM my_table, my_association_table AS
my_association_table_1 WHERE
my_table.id = my_association_table_1.parent_id
AND my_association_table_1.child_id = &lt;some id&gt;</pre>
</div>
<p>Where <tt class="docutils literal"><span class="pre">&lt;some</span> <span class="pre">id&gt;</span></tt> would be the primary key of
<tt class="docutils literal"><span class="pre">other</span></tt>. From the above, it is clear that
<a class="reference internal" href="#sqlalchemy.orm.properties.RelationshipProperty.Comparator.contains" title="sqlalchemy.orm.properties.RelationshipProperty.Comparator.contains"><tt class="xref py py-meth docutils literal"><span class="pre">contains()</span></tt></a>
will <strong>not</strong> work with many-to-many collections when
used in queries that move beyond simple AND
conjunctions, such as multiple
<a class="reference internal" href="#sqlalchemy.orm.properties.RelationshipProperty.Comparator.contains" title="sqlalchemy.orm.properties.RelationshipProperty.Comparator.contains"><tt class="xref py py-meth docutils literal"><span class="pre">contains()</span></tt></a>
expressions joined by OR. In such cases subqueries or
explicit &#8220;outer joins&#8221; will need to be used instead.
See <a class="reference internal" href="#sqlalchemy.orm.properties.RelationshipProperty.Comparator.any" title="sqlalchemy.orm.properties.RelationshipProperty.Comparator.any"><tt class="xref py py-meth docutils literal"><span class="pre">any()</span></tt></a> for
a less-performant alternative using EXISTS, or refer
to <a class="reference internal" href="query.html#sqlalchemy.orm.query.Query.outerjoin" title="sqlalchemy.orm.query.Query.outerjoin"><tt class="xref py py-meth docutils literal"><span class="pre">Query.outerjoin()</span></tt></a> as well as <a class="reference internal" href="tutorial.html#ormtutorial-joins"><em>Querying with Joins</em></a>
for more details on constructing outer joins.</p>
</dd></dl>

<dl class="method">
<dt id="sqlalchemy.orm.properties.RelationshipProperty.Comparator.desc">
<tt class="descname">desc</tt><big>(</big><big>)</big><a class="headerlink" href="#sqlalchemy.orm.properties.RelationshipProperty.Comparator.desc" title="Permalink to this definition">¶</a></dt>
<dd><div class="inherited-member container">
<em>inherited from the</em> <a class="reference internal" href="../core/expression_api.html#sqlalchemy.sql.operators.ColumnOperators.desc" title="sqlalchemy.sql.operators.ColumnOperators.desc"><tt class="xref py py-meth docutils literal"><span class="pre">desc()</span></tt></a> <em>method of</em> <a class="reference internal" href="../core/expression_api.html#sqlalchemy.sql.operators.ColumnOperators" title="sqlalchemy.sql.operators.ColumnOperators"><tt class="xref py py-class docutils literal"><span class="pre">ColumnOperators</span></tt></a></div>
<p>Produce a <a class="reference internal" href="../core/expression_api.html#sqlalchemy.sql.expression.desc" title="sqlalchemy.sql.expression.desc"><tt class="xref py py-func docutils literal"><span class="pre">desc()</span></tt></a> clause against the
parent object.</p>
</dd></dl>

<dl class="method">
<dt id="sqlalchemy.orm.properties.RelationshipProperty.Comparator.distinct">
<tt class="descname">distinct</tt><big>(</big><big>)</big><a class="headerlink" href="#sqlalchemy.orm.properties.RelationshipProperty.Comparator.distinct" title="Permalink to this definition">¶</a></dt>
<dd><div class="inherited-member container">
<em>inherited from the</em> <a class="reference internal" href="../core/expression_api.html#sqlalchemy.sql.operators.ColumnOperators.distinct" title="sqlalchemy.sql.operators.ColumnOperators.distinct"><tt class="xref py py-meth docutils literal"><span class="pre">distinct()</span></tt></a> <em>method of</em> <a class="reference internal" href="../core/expression_api.html#sqlalchemy.sql.operators.ColumnOperators" title="sqlalchemy.sql.operators.ColumnOperators"><tt class="xref py py-class docutils literal"><span class="pre">ColumnOperators</span></tt></a></div>
<p>Produce a <a class="reference internal" href="../core/expression_api.html#sqlalchemy.sql.expression.distinct" title="sqlalchemy.sql.expression.distinct"><tt class="xref py py-func docutils literal"><span class="pre">distinct()</span></tt></a> clause against the
parent object.</p>
</dd></dl>

<dl class="method">
<dt id="sqlalchemy.orm.properties.RelationshipProperty.Comparator.endswith">
<tt class="descname">endswith</tt><big>(</big><em>other</em>, <em>**kwargs</em><big>)</big><a class="headerlink" href="#sqlalchemy.orm.properties.RelationshipProperty.Comparator.endswith" title="Permalink to this definition">¶</a></dt>
<dd><div class="inherited-member container">
<em>inherited from the</em> <a class="reference internal" href="../core/expression_api.html#sqlalchemy.sql.operators.ColumnOperators.endswith" title="sqlalchemy.sql.operators.ColumnOperators.endswith"><tt class="xref py py-meth docutils literal"><span class="pre">endswith()</span></tt></a> <em>method of</em> <a class="reference internal" href="../core/expression_api.html#sqlalchemy.sql.operators.ColumnOperators" title="sqlalchemy.sql.operators.ColumnOperators"><tt class="xref py py-class docutils literal"><span class="pre">ColumnOperators</span></tt></a></div>
<p>Implement the &#8216;endswith&#8217; operator.</p>
<p>In a column context, produces the clause <tt class="docutils literal"><span class="pre">LIKE</span> <span class="pre">'%&lt;other&gt;'</span></tt></p>
</dd></dl>

<dl class="method">
<dt id="sqlalchemy.orm.properties.RelationshipProperty.Comparator.has">
<tt class="descname">has</tt><big>(</big><em>criterion=None</em>, <em>**kwargs</em><big>)</big><a class="headerlink" href="#sqlalchemy.orm.properties.RelationshipProperty.Comparator.has" title="Permalink to this definition">¶</a></dt>
<dd><p>Produce an expression that tests a scalar reference against
particular criterion, using EXISTS.</p>
<p>An expression like:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="n">session</span><span class="o">.</span><span class="n">query</span><span class="p">(</span><span class="n">MyClass</span><span class="p">)</span><span class="o">.</span><span class="n">filter</span><span class="p">(</span>
    <span class="n">MyClass</span><span class="o">.</span><span class="n">somereference</span><span class="o">.</span><span class="n">has</span><span class="p">(</span><span class="n">SomeRelated</span><span class="o">.</span><span class="n">x</span><span class="o">==</span><span class="mi">2</span><span class="p">)</span>
<span class="p">)</span></pre></div>
</div>
<p>Will produce a query like:</p>
<div class="highlight-python"><pre>SELECT * FROM my_table WHERE
EXISTS (SELECT 1 FROM related WHERE
related.id==my_table.related_id AND related.x=2)</pre>
</div>
<p>Because <a class="reference internal" href="#sqlalchemy.orm.properties.RelationshipProperty.Comparator.has" title="sqlalchemy.orm.properties.RelationshipProperty.Comparator.has"><tt class="xref py py-meth docutils literal"><span class="pre">has()</span></tt></a> uses
a correlated subquery, its performance is not nearly as
good when compared against large target tables as that of
using a join.</p>
<p><a class="reference internal" href="#sqlalchemy.orm.properties.RelationshipProperty.Comparator.has" title="sqlalchemy.orm.properties.RelationshipProperty.Comparator.has"><tt class="xref py py-meth docutils literal"><span class="pre">has()</span></tt></a> is only
valid for scalar references, i.e. a <a class="reference internal" href="relationships.html#sqlalchemy.orm.relationship" title="sqlalchemy.orm.relationship"><tt class="xref py py-func docutils literal"><span class="pre">relationship()</span></tt></a>
that has <tt class="docutils literal"><span class="pre">uselist=False</span></tt>.  For collection references,
use <a class="reference internal" href="#sqlalchemy.orm.properties.RelationshipProperty.Comparator.any" title="sqlalchemy.orm.properties.RelationshipProperty.Comparator.any"><tt class="xref py py-meth docutils literal"><span class="pre">any()</span></tt></a>.</p>
</dd></dl>

<dl class="method">
<dt id="sqlalchemy.orm.properties.RelationshipProperty.Comparator.ilike">
<tt class="descname">ilike</tt><big>(</big><em>other</em>, <em>escape=None</em><big>)</big><a class="headerlink" href="#sqlalchemy.orm.properties.RelationshipProperty.Comparator.ilike" title="Permalink to this definition">¶</a></dt>
<dd><div class="inherited-member container">
<em>inherited from the</em> <a class="reference internal" href="../core/expression_api.html#sqlalchemy.sql.operators.ColumnOperators.ilike" title="sqlalchemy.sql.operators.ColumnOperators.ilike"><tt class="xref py py-meth docutils literal"><span class="pre">ilike()</span></tt></a> <em>method of</em> <a class="reference internal" href="../core/expression_api.html#sqlalchemy.sql.operators.ColumnOperators" title="sqlalchemy.sql.operators.ColumnOperators"><tt class="xref py py-class docutils literal"><span class="pre">ColumnOperators</span></tt></a></div>
<p>Implement the <tt class="docutils literal"><span class="pre">ilike</span></tt> operator.</p>
<p>In a column context, produces the clause <tt class="docutils literal"><span class="pre">a</span> <span class="pre">ILIKE</span> <span class="pre">other</span></tt>.</p>
<p>E.g.:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="n">select</span><span class="p">([</span><span class="n">sometable</span><span class="p">])</span><span class="o">.</span><span class="n">where</span><span class="p">(</span><span class="n">sometable</span><span class="o">.</span><span class="n">c</span><span class="o">.</span><span class="n">column</span><span class="o">.</span><span class="n">ilike</span><span class="p">(</span><span class="s">&quot;</span><span class="si">%f</span><span class="s">oobar%&quot;</span><span class="p">))</span></pre></div>
</div>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
<li><strong>other</strong> &#8211; expression to be compared</li>
<li><strong>escape</strong> &#8211; <p>optional escape character, renders the <tt class="docutils literal"><span class="pre">ESCAPE</span></tt>
keyword, e.g.:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="n">somecolumn</span><span class="o">.</span><span class="n">ilike</span><span class="p">(</span><span class="s">&quot;foo/%bar&quot;</span><span class="p">,</span> <span class="n">escape</span><span class="o">=</span><span class="s">&quot;/&quot;</span><span class="p">)</span></pre></div>
</div>
</li>
</ul>
</td>
</tr>
</tbody>
</table>
<div class="admonition-see-also admonition seealso">
<p class="first admonition-title">See also</p>
<p class="last"><a class="reference internal" href="../core/expression_api.html#sqlalchemy.sql.operators.ColumnOperators.like" title="sqlalchemy.sql.operators.ColumnOperators.like"><tt class="xref py py-meth docutils literal"><span class="pre">ColumnOperators.like()</span></tt></a></p>
</div>
</dd></dl>

<dl class="method">
<dt id="sqlalchemy.orm.properties.RelationshipProperty.Comparator.in_">
<tt class="descname">in_</tt><big>(</big><em>other</em><big>)</big><a class="headerlink" href="#sqlalchemy.orm.properties.RelationshipProperty.Comparator.in_" title="Permalink to this definition">¶</a></dt>
<dd><p>Produce an IN clause - this is not implemented
for <a class="reference internal" href="relationships.html#sqlalchemy.orm.relationship" title="sqlalchemy.orm.relationship"><tt class="xref py py-func docutils literal"><span class="pre">relationship()</span></tt></a>-based attributes at this time.</p>
</dd></dl>

<dl class="method">
<dt id="sqlalchemy.orm.properties.RelationshipProperty.Comparator.is_">
<tt class="descname">is_</tt><big>(</big><em>other</em><big>)</big><a class="headerlink" href="#sqlalchemy.orm.properties.RelationshipProperty.Comparator.is_" title="Permalink to this definition">¶</a></dt>
<dd><div class="inherited-member container">
<em>inherited from the</em> <a class="reference internal" href="../core/expression_api.html#sqlalchemy.sql.operators.ColumnOperators.is_" title="sqlalchemy.sql.operators.ColumnOperators.is_"><tt class="xref py py-meth docutils literal"><span class="pre">is_()</span></tt></a> <em>method of</em> <a class="reference internal" href="../core/expression_api.html#sqlalchemy.sql.operators.ColumnOperators" title="sqlalchemy.sql.operators.ColumnOperators"><tt class="xref py py-class docutils literal"><span class="pre">ColumnOperators</span></tt></a></div>
<p>Implement the <tt class="docutils literal"><span class="pre">IS</span></tt> operator.</p>
<p>Normally, <tt class="docutils literal"><span class="pre">IS</span></tt> is generated automatically when comparing to a
value of <tt class="docutils literal"><span class="pre">None</span></tt>, which resolves to <tt class="docutils literal"><span class="pre">NULL</span></tt>.  However, explicit
usage of <tt class="docutils literal"><span class="pre">IS</span></tt> may be desirable if comparing to boolean values
on certain platforms.</p>
<p class="versionadded">
<span class="versionmodified">New in version 0.7.9.</span></p>
<div class="admonition-see-also admonition seealso">
<p class="first admonition-title">See also</p>
<p class="last"><a class="reference internal" href="../core/expression_api.html#sqlalchemy.sql.operators.ColumnOperators.isnot" title="sqlalchemy.sql.operators.ColumnOperators.isnot"><tt class="xref py py-meth docutils literal"><span class="pre">ColumnOperators.isnot()</span></tt></a></p>
</div>
</dd></dl>

<dl class="method">
<dt id="sqlalchemy.orm.properties.RelationshipProperty.Comparator.isnot">
<tt class="descname">isnot</tt><big>(</big><em>other</em><big>)</big><a class="headerlink" href="#sqlalchemy.orm.properties.RelationshipProperty.Comparator.isnot" title="Permalink to this definition">¶</a></dt>
<dd><div class="inherited-member container">
<em>inherited from the</em> <a class="reference internal" href="../core/expression_api.html#sqlalchemy.sql.operators.ColumnOperators.isnot" title="sqlalchemy.sql.operators.ColumnOperators.isnot"><tt class="xref py py-meth docutils literal"><span class="pre">isnot()</span></tt></a> <em>method of</em> <a class="reference internal" href="../core/expression_api.html#sqlalchemy.sql.operators.ColumnOperators" title="sqlalchemy.sql.operators.ColumnOperators"><tt class="xref py py-class docutils literal"><span class="pre">ColumnOperators</span></tt></a></div>
<p>Implement the <tt class="docutils literal"><span class="pre">IS</span> <span class="pre">NOT</span></tt> operator.</p>
<p>Normally, <tt class="docutils literal"><span class="pre">IS</span> <span class="pre">NOT</span></tt> is generated automatically when comparing to a
value of <tt class="docutils literal"><span class="pre">None</span></tt>, which resolves to <tt class="docutils literal"><span class="pre">NULL</span></tt>.  However, explicit
usage of <tt class="docutils literal"><span class="pre">IS</span> <span class="pre">NOT</span></tt> may be desirable if comparing to boolean values
on certain platforms.</p>
<p class="versionadded">
<span class="versionmodified">New in version 0.7.9.</span></p>
<div class="admonition-see-also admonition seealso">
<p class="first admonition-title">See also</p>
<p class="last"><a class="reference internal" href="../core/expression_api.html#sqlalchemy.sql.operators.ColumnOperators.is_" title="sqlalchemy.sql.operators.ColumnOperators.is_"><tt class="xref py py-meth docutils literal"><span class="pre">ColumnOperators.is_()</span></tt></a></p>
</div>
</dd></dl>

<dl class="method">
<dt id="sqlalchemy.orm.properties.RelationshipProperty.Comparator.like">
<tt class="descname">like</tt><big>(</big><em>other</em>, <em>escape=None</em><big>)</big><a class="headerlink" href="#sqlalchemy.orm.properties.RelationshipProperty.Comparator.like" title="Permalink to this definition">¶</a></dt>
<dd><div class="inherited-member container">
<em>inherited from the</em> <a class="reference internal" href="../core/expression_api.html#sqlalchemy.sql.operators.ColumnOperators.like" title="sqlalchemy.sql.operators.ColumnOperators.like"><tt class="xref py py-meth docutils literal"><span class="pre">like()</span></tt></a> <em>method of</em> <a class="reference internal" href="../core/expression_api.html#sqlalchemy.sql.operators.ColumnOperators" title="sqlalchemy.sql.operators.ColumnOperators"><tt class="xref py py-class docutils literal"><span class="pre">ColumnOperators</span></tt></a></div>
<p>Implement the <tt class="docutils literal"><span class="pre">like</span></tt> operator.</p>
<p>In a column context, produces the clause <tt class="docutils literal"><span class="pre">a</span> <span class="pre">LIKE</span> <span class="pre">other</span></tt>.</p>
<p>E.g.:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="n">select</span><span class="p">([</span><span class="n">sometable</span><span class="p">])</span><span class="o">.</span><span class="n">where</span><span class="p">(</span><span class="n">sometable</span><span class="o">.</span><span class="n">c</span><span class="o">.</span><span class="n">column</span><span class="o">.</span><span class="n">like</span><span class="p">(</span><span class="s">&quot;</span><span class="si">%f</span><span class="s">oobar%&quot;</span><span class="p">))</span></pre></div>
</div>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
<li><strong>other</strong> &#8211; expression to be compared</li>
<li><strong>escape</strong> &#8211; <p>optional escape character, renders the <tt class="docutils literal"><span class="pre">ESCAPE</span></tt>
keyword, e.g.:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="n">somecolumn</span><span class="o">.</span><span class="n">like</span><span class="p">(</span><span class="s">&quot;foo/%bar&quot;</span><span class="p">,</span> <span class="n">escape</span><span class="o">=</span><span class="s">&quot;/&quot;</span><span class="p">)</span></pre></div>
</div>
</li>
</ul>
</td>
</tr>
</tbody>
</table>
<div class="admonition-see-also admonition seealso">
<p class="first admonition-title">See also</p>
<p class="last"><a class="reference internal" href="../core/expression_api.html#sqlalchemy.sql.operators.ColumnOperators.ilike" title="sqlalchemy.sql.operators.ColumnOperators.ilike"><tt class="xref py py-meth docutils literal"><span class="pre">ColumnOperators.ilike()</span></tt></a></p>
</div>
</dd></dl>

<dl class="attribute">
<dt id="sqlalchemy.orm.properties.RelationshipProperty.Comparator.mapper">
<tt class="descname">mapper</tt><a class="headerlink" href="#sqlalchemy.orm.properties.RelationshipProperty.Comparator.mapper" title="Permalink to this definition">¶</a></dt>
<dd><p>The target <a class="reference internal" href="mapper_config.html#sqlalchemy.orm.mapper.Mapper" title="sqlalchemy.orm.mapper.Mapper"><tt class="xref py py-class docutils literal"><span class="pre">Mapper</span></tt></a> referred to by this
:class:<a href="#id1"><span class="problematic" id="id2">`</span></a>.RelationshipProperty.Comparator.</p>
<p>This is the &#8220;target&#8221; or &#8220;remote&#8221; side of the
<a class="reference internal" href="relationships.html#sqlalchemy.orm.relationship" title="sqlalchemy.orm.relationship"><tt class="xref py py-func docutils literal"><span class="pre">relationship()</span></tt></a>.</p>
</dd></dl>

<dl class="method">
<dt id="sqlalchemy.orm.properties.RelationshipProperty.Comparator.match">
<tt class="descname">match</tt><big>(</big><em>other</em>, <em>**kwargs</em><big>)</big><a class="headerlink" href="#sqlalchemy.orm.properties.RelationshipProperty.Comparator.match" title="Permalink to this definition">¶</a></dt>
<dd><div class="inherited-member container">
<em>inherited from the</em> <a class="reference internal" href="../core/expression_api.html#sqlalchemy.sql.operators.ColumnOperators.match" title="sqlalchemy.sql.operators.ColumnOperators.match"><tt class="xref py py-meth docutils literal"><span class="pre">match()</span></tt></a> <em>method of</em> <a class="reference internal" href="../core/expression_api.html#sqlalchemy.sql.operators.ColumnOperators" title="sqlalchemy.sql.operators.ColumnOperators"><tt class="xref py py-class docutils literal"><span class="pre">ColumnOperators</span></tt></a></div>
<p>Implements the &#8216;match&#8217; operator.</p>
<p>In a column context, this produces a MATCH clause, i.e.
<tt class="docutils literal"><span class="pre">MATCH</span> <span class="pre">'&lt;other&gt;'</span></tt>.  The allowed contents of <tt class="docutils literal"><span class="pre">other</span></tt>
are database backend specific.</p>
</dd></dl>

<dl class="method">
<dt id="sqlalchemy.orm.properties.RelationshipProperty.Comparator.notilike">
<tt class="descname">notilike</tt><big>(</big><em>other</em>, <em>escape=None</em><big>)</big><a class="headerlink" href="#sqlalchemy.orm.properties.RelationshipProperty.Comparator.notilike" title="Permalink to this definition">¶</a></dt>
<dd><div class="inherited-member container">
<em>inherited from the</em> <a class="reference internal" href="../core/expression_api.html#sqlalchemy.sql.operators.ColumnOperators.notilike" title="sqlalchemy.sql.operators.ColumnOperators.notilike"><tt class="xref py py-meth docutils literal"><span class="pre">notilike()</span></tt></a> <em>method of</em> <a class="reference internal" href="../core/expression_api.html#sqlalchemy.sql.operators.ColumnOperators" title="sqlalchemy.sql.operators.ColumnOperators"><tt class="xref py py-class docutils literal"><span class="pre">ColumnOperators</span></tt></a></div>
<p>implement the <tt class="docutils literal"><span class="pre">NOT</span> <span class="pre">ILIKE</span></tt> operator.</p>
<p>This is equivalent to using negation with
<a class="reference internal" href="../core/expression_api.html#sqlalchemy.sql.operators.ColumnOperators.ilike" title="sqlalchemy.sql.operators.ColumnOperators.ilike"><tt class="xref py py-meth docutils literal"><span class="pre">ColumnOperators.ilike()</span></tt></a>, i.e. <tt class="docutils literal"><span class="pre">~x.ilike(y)</span></tt>.</p>
<p class="versionadded">
<span class="versionmodified">New in version 0.8.</span></p>
<div class="admonition-see-also admonition seealso">
<p class="first admonition-title">See also</p>
<p class="last"><a class="reference internal" href="../core/expression_api.html#sqlalchemy.sql.operators.ColumnOperators.ilike" title="sqlalchemy.sql.operators.ColumnOperators.ilike"><tt class="xref py py-meth docutils literal"><span class="pre">ColumnOperators.ilike()</span></tt></a></p>
</div>
</dd></dl>

<dl class="method">
<dt id="sqlalchemy.orm.properties.RelationshipProperty.Comparator.notin_">
<tt class="descname">notin_</tt><big>(</big><em>other</em><big>)</big><a class="headerlink" href="#sqlalchemy.orm.properties.RelationshipProperty.Comparator.notin_" title="Permalink to this definition">¶</a></dt>
<dd><div class="inherited-member container">
<em>inherited from the</em> <a class="reference internal" href="../core/expression_api.html#sqlalchemy.sql.operators.ColumnOperators.notin_" title="sqlalchemy.sql.operators.ColumnOperators.notin_"><tt class="xref py py-meth docutils literal"><span class="pre">notin_()</span></tt></a> <em>method of</em> <a class="reference internal" href="../core/expression_api.html#sqlalchemy.sql.operators.ColumnOperators" title="sqlalchemy.sql.operators.ColumnOperators"><tt class="xref py py-class docutils literal"><span class="pre">ColumnOperators</span></tt></a></div>
<p>implement the <tt class="docutils literal"><span class="pre">NOT</span> <span class="pre">IN</span></tt> operator.</p>
<p>This is equivalent to using negation with <a class="reference internal" href="../core/expression_api.html#sqlalchemy.sql.operators.ColumnOperators.in_" title="sqlalchemy.sql.operators.ColumnOperators.in_"><tt class="xref py py-meth docutils literal"><span class="pre">ColumnOperators.in_()</span></tt></a>,
i.e. <tt class="docutils literal"><span class="pre">~x.in_(y)</span></tt>.</p>
<p class="versionadded">
<span class="versionmodified">New in version 0.8.</span></p>
<div class="admonition-see-also admonition seealso">
<p class="first admonition-title">See also</p>
<p class="last"><a class="reference internal" href="../core/expression_api.html#sqlalchemy.sql.operators.ColumnOperators.in_" title="sqlalchemy.sql.operators.ColumnOperators.in_"><tt class="xref py py-meth docutils literal"><span class="pre">ColumnOperators.in_()</span></tt></a></p>
</div>
</dd></dl>

<dl class="method">
<dt id="sqlalchemy.orm.properties.RelationshipProperty.Comparator.notlike">
<tt class="descname">notlike</tt><big>(</big><em>other</em>, <em>escape=None</em><big>)</big><a class="headerlink" href="#sqlalchemy.orm.properties.RelationshipProperty.Comparator.notlike" title="Permalink to this definition">¶</a></dt>
<dd><div class="inherited-member container">
<em>inherited from the</em> <a class="reference internal" href="../core/expression_api.html#sqlalchemy.sql.operators.ColumnOperators.notlike" title="sqlalchemy.sql.operators.ColumnOperators.notlike"><tt class="xref py py-meth docutils literal"><span class="pre">notlike()</span></tt></a> <em>method of</em> <a class="reference internal" href="../core/expression_api.html#sqlalchemy.sql.operators.ColumnOperators" title="sqlalchemy.sql.operators.ColumnOperators"><tt class="xref py py-class docutils literal"><span class="pre">ColumnOperators</span></tt></a></div>
<p>implement the <tt class="docutils literal"><span class="pre">NOT</span> <span class="pre">LIKE</span></tt> operator.</p>
<p>This is equivalent to using negation with
<a class="reference internal" href="../core/expression_api.html#sqlalchemy.sql.operators.ColumnOperators.like" title="sqlalchemy.sql.operators.ColumnOperators.like"><tt class="xref py py-meth docutils literal"><span class="pre">ColumnOperators.like()</span></tt></a>, i.e. <tt class="docutils literal"><span class="pre">~x.like(y)</span></tt>.</p>
<p class="versionadded">
<span class="versionmodified">New in version 0.8.</span></p>
<div class="admonition-see-also admonition seealso">
<p class="first admonition-title">See also</p>
<p class="last"><a class="reference internal" href="../core/expression_api.html#sqlalchemy.sql.operators.ColumnOperators.like" title="sqlalchemy.sql.operators.ColumnOperators.like"><tt class="xref py py-meth docutils literal"><span class="pre">ColumnOperators.like()</span></tt></a></p>
</div>
</dd></dl>

<dl class="method">
<dt id="sqlalchemy.orm.properties.RelationshipProperty.Comparator.nullsfirst">
<tt class="descname">nullsfirst</tt><big>(</big><big>)</big><a class="headerlink" href="#sqlalchemy.orm.properties.RelationshipProperty.Comparator.nullsfirst" title="Permalink to this definition">¶</a></dt>
<dd><div class="inherited-member container">
<em>inherited from the</em> <a class="reference internal" href="../core/expression_api.html#sqlalchemy.sql.operators.ColumnOperators.nullsfirst" title="sqlalchemy.sql.operators.ColumnOperators.nullsfirst"><tt class="xref py py-meth docutils literal"><span class="pre">nullsfirst()</span></tt></a> <em>method of</em> <a class="reference internal" href="../core/expression_api.html#sqlalchemy.sql.operators.ColumnOperators" title="sqlalchemy.sql.operators.ColumnOperators"><tt class="xref py py-class docutils literal"><span class="pre">ColumnOperators</span></tt></a></div>
<p>Produce a <a class="reference internal" href="../core/expression_api.html#sqlalchemy.sql.expression.nullsfirst" title="sqlalchemy.sql.expression.nullsfirst"><tt class="xref py py-func docutils literal"><span class="pre">nullsfirst()</span></tt></a> clause against the
parent object.</p>
</dd></dl>

<dl class="method">
<dt id="sqlalchemy.orm.properties.RelationshipProperty.Comparator.nullslast">
<tt class="descname">nullslast</tt><big>(</big><big>)</big><a class="headerlink" href="#sqlalchemy.orm.properties.RelationshipProperty.Comparator.nullslast" title="Permalink to this definition">¶</a></dt>
<dd><div class="inherited-member container">
<em>inherited from the</em> <a class="reference internal" href="../core/expression_api.html#sqlalchemy.sql.operators.ColumnOperators.nullslast" title="sqlalchemy.sql.operators.ColumnOperators.nullslast"><tt class="xref py py-meth docutils literal"><span class="pre">nullslast()</span></tt></a> <em>method of</em> <a class="reference internal" href="../core/expression_api.html#sqlalchemy.sql.operators.ColumnOperators" title="sqlalchemy.sql.operators.ColumnOperators"><tt class="xref py py-class docutils literal"><span class="pre">ColumnOperators</span></tt></a></div>
<p>Produce a <a class="reference internal" href="../core/expression_api.html#sqlalchemy.sql.expression.nullslast" title="sqlalchemy.sql.expression.nullslast"><tt class="xref py py-func docutils literal"><span class="pre">nullslast()</span></tt></a> clause against the
parent object.</p>
</dd></dl>

<dl class="method">
<dt id="sqlalchemy.orm.properties.RelationshipProperty.Comparator.of_type">
<tt class="descname">of_type</tt><big>(</big><em>cls</em><big>)</big><a class="headerlink" href="#sqlalchemy.orm.properties.RelationshipProperty.Comparator.of_type" title="Permalink to this definition">¶</a></dt>
<dd><p>Produce a construct that represents a particular &#8216;subtype&#8217; of
attribute for the parent class.</p>
<p>Currently this is usable in conjunction with <a class="reference internal" href="query.html#sqlalchemy.orm.query.Query.join" title="sqlalchemy.orm.query.Query.join"><tt class="xref py py-meth docutils literal"><span class="pre">Query.join()</span></tt></a>
and <a class="reference internal" href="query.html#sqlalchemy.orm.query.Query.outerjoin" title="sqlalchemy.orm.query.Query.outerjoin"><tt class="xref py py-meth docutils literal"><span class="pre">Query.outerjoin()</span></tt></a>.</p>
</dd></dl>

<dl class="method">
<dt id="sqlalchemy.orm.properties.RelationshipProperty.Comparator.op">
<tt class="descname">op</tt><big>(</big><em>opstring</em>, <em>precedence=0</em><big>)</big><a class="headerlink" href="#sqlalchemy.orm.properties.RelationshipProperty.Comparator.op" title="Permalink to this definition">¶</a></dt>
<dd><div class="inherited-member container">
<em>inherited from the</em> <a class="reference internal" href="../core/expression_api.html#sqlalchemy.sql.operators.Operators.op" title="sqlalchemy.sql.operators.Operators.op"><tt class="xref py py-meth docutils literal"><span class="pre">op()</span></tt></a> <em>method of</em> <a class="reference internal" href="../core/expression_api.html#sqlalchemy.sql.operators.Operators" title="sqlalchemy.sql.operators.Operators"><tt class="xref py py-class docutils literal"><span class="pre">Operators</span></tt></a></div>
<p>produce a generic operator function.</p>
<p>e.g.:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="n">somecolumn</span><span class="o">.</span><span class="n">op</span><span class="p">(</span><span class="s">&quot;*&quot;</span><span class="p">)(</span><span class="mi">5</span><span class="p">)</span></pre></div>
</div>
<p>produces:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="n">somecolumn</span> <span class="o">*</span> <span class="mi">5</span></pre></div>
</div>
<p>This function can also be used to make bitwise operators explicit. For
example:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="n">somecolumn</span><span class="o">.</span><span class="n">op</span><span class="p">(</span><span class="s">&#39;&amp;&#39;</span><span class="p">)(</span><span class="mh">0xff</span><span class="p">)</span></pre></div>
</div>
<p>is a bitwise AND of the value in <tt class="docutils literal"><span class="pre">somecolumn</span></tt>.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
<li><strong>operator</strong> &#8211; a string which will be output as the infix operator
between this element and the expression passed to the
generated function.</li>
<li><strong>precedence</strong> &#8211; <p>precedence to apply to the operator, when
parenthesizing expressions.  A lower number will cause the expression
to be parenthesized when applied against another operator with
higher precedence.  The default value of <tt class="docutils literal"><span class="pre">0</span></tt> is lower than all
operators except for the comma (<tt class="docutils literal"><span class="pre">,</span></tt>) and <tt class="docutils literal"><span class="pre">AS</span></tt> operators.
A value of 100 will be higher or equal to all operators, and -100
will be lower than or equal to all operators.</p>
<p class="versionadded">
<span class="versionmodified">New in version 0.8: </span>- added the &#8216;precedence&#8217; argument.</p>
</li>
</ul>
</td>
</tr>
</tbody>
</table>
<div class="admonition-see-also admonition seealso">
<p class="first admonition-title">See also</p>
<p class="last"><a class="reference internal" href="../core/types.html#types-operators"><em>Redefining and Creating New Operators</em></a></p>
</div>
</dd></dl>

<dl class="method">
<dt id="sqlalchemy.orm.properties.RelationshipProperty.Comparator.operate">
<tt class="descname">operate</tt><big>(</big><em>op</em>, <em>*other</em>, <em>**kwargs</em><big>)</big><a class="headerlink" href="#sqlalchemy.orm.properties.RelationshipProperty.Comparator.operate" title="Permalink to this definition">¶</a></dt>
<dd><div class="inherited-member container">
<em>inherited from the</em> <a class="reference internal" href="../core/expression_api.html#sqlalchemy.sql.operators.Operators.operate" title="sqlalchemy.sql.operators.Operators.operate"><tt class="xref py py-meth docutils literal"><span class="pre">operate()</span></tt></a> <em>method of</em> <a class="reference internal" href="../core/expression_api.html#sqlalchemy.sql.operators.Operators" title="sqlalchemy.sql.operators.Operators"><tt class="xref py py-class docutils literal"><span class="pre">Operators</span></tt></a></div>
<p>Operate on an argument.</p>
<p>This is the lowest level of operation, raises
<tt class="xref py py-class docutils literal"><span class="pre">NotImplementedError</span></tt> by default.</p>
<p>Overriding this on a subclass can allow common
behavior to be applied to all operations.
For example, overriding <a class="reference internal" href="../core/expression_api.html#sqlalchemy.sql.operators.ColumnOperators" title="sqlalchemy.sql.operators.ColumnOperators"><tt class="xref py py-class docutils literal"><span class="pre">ColumnOperators</span></tt></a>
to apply <tt class="docutils literal"><span class="pre">func.lower()</span></tt> to the left and right
side:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="k">class</span> <span class="nc">MyComparator</span><span class="p">(</span><span class="n">ColumnOperators</span><span class="p">):</span>
    <span class="k">def</span> <span class="nf">operate</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">op</span><span class="p">,</span> <span class="n">other</span><span class="p">):</span>
        <span class="k">return</span> <span class="n">op</span><span class="p">(</span><span class="n">func</span><span class="o">.</span><span class="n">lower</span><span class="p">(</span><span class="bp">self</span><span class="p">),</span> <span class="n">func</span><span class="o">.</span><span class="n">lower</span><span class="p">(</span><span class="n">other</span><span class="p">))</span></pre></div>
</div>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
<li><strong>op</strong> &#8211; Operator callable.</li>
<li><strong>*other</strong> &#8211; the &#8216;other&#8217; side of the operation. Will
be a single scalar for most operations.</li>
<li><strong>**kwargs</strong> &#8211; modifiers.  These may be passed by special
operators such as <tt class="xref py py-meth docutils literal"><span class="pre">ColumnOperators.contains()</span></tt>.</li>
</ul>
</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="sqlalchemy.orm.properties.RelationshipProperty.Comparator.reverse_operate">
<tt class="descname">reverse_operate</tt><big>(</big><em>op</em>, <em>other</em>, <em>**kwargs</em><big>)</big><a class="headerlink" href="#sqlalchemy.orm.properties.RelationshipProperty.Comparator.reverse_operate" title="Permalink to this definition">¶</a></dt>
<dd><div class="inherited-member container">
<em>inherited from the</em> <a class="reference internal" href="../core/expression_api.html#sqlalchemy.sql.operators.Operators.reverse_operate" title="sqlalchemy.sql.operators.Operators.reverse_operate"><tt class="xref py py-meth docutils literal"><span class="pre">reverse_operate()</span></tt></a> <em>method of</em> <a class="reference internal" href="../core/expression_api.html#sqlalchemy.sql.operators.Operators" title="sqlalchemy.sql.operators.Operators"><tt class="xref py py-class docutils literal"><span class="pre">Operators</span></tt></a></div>
<p>Reverse operate on an argument.</p>
<p>Usage is the same as <tt class="xref py py-meth docutils literal"><span class="pre">operate()</span></tt>.</p>
</dd></dl>

<dl class="method">
<dt id="sqlalchemy.orm.properties.RelationshipProperty.Comparator.startswith">
<tt class="descname">startswith</tt><big>(</big><em>other</em>, <em>**kwargs</em><big>)</big><a class="headerlink" href="#sqlalchemy.orm.properties.RelationshipProperty.Comparator.startswith" title="Permalink to this definition">¶</a></dt>
<dd><div class="inherited-member container">
<em>inherited from the</em> <a class="reference internal" href="../core/expression_api.html#sqlalchemy.sql.operators.ColumnOperators.startswith" title="sqlalchemy.sql.operators.ColumnOperators.startswith"><tt class="xref py py-meth docutils literal"><span class="pre">startswith()</span></tt></a> <em>method of</em> <a class="reference internal" href="../core/expression_api.html#sqlalchemy.sql.operators.ColumnOperators" title="sqlalchemy.sql.operators.ColumnOperators"><tt class="xref py py-class docutils literal"><span class="pre">ColumnOperators</span></tt></a></div>
<p>Implement the <tt class="docutils literal"><span class="pre">startwith</span></tt> operator.</p>
<p>In a column context, produces the clause <tt class="docutils literal"><span class="pre">LIKE</span> <span class="pre">'&lt;other&gt;%'</span></tt></p>
</dd></dl>

</dd></dl>

<dl class="attribute">
<dt id="sqlalchemy.orm.properties.RelationshipProperty.cascade">
<tt class="descclassname">RelationshipProperty.</tt><tt class="descname">cascade</tt><a class="headerlink" href="#sqlalchemy.orm.properties.RelationshipProperty.cascade" title="Permalink to this definition">¶</a></dt>
<dd><p>Return the current cascade setting for this
<a class="reference internal" href="#sqlalchemy.orm.properties.RelationshipProperty" title="sqlalchemy.orm.properties.RelationshipProperty"><tt class="xref py py-class docutils literal"><span class="pre">RelationshipProperty</span></tt></a>.</p>
</dd></dl>

<dl class="attribute">
<dt id="sqlalchemy.orm.properties.RelationshipProperty.class_attribute">
<tt class="descclassname">RelationshipProperty.</tt><tt class="descname">class_attribute</tt><a class="headerlink" href="#sqlalchemy.orm.properties.RelationshipProperty.class_attribute" title="Permalink to this definition">¶</a></dt>
<dd><div class="inherited-member container">
<em>inherited from the</em> <a class="reference internal" href="#sqlalchemy.orm.interfaces.MapperProperty.class_attribute" title="sqlalchemy.orm.interfaces.MapperProperty.class_attribute"><tt class="xref py py-attr docutils literal"><span class="pre">class_attribute</span></tt></a> <em>attribute of</em> <a class="reference internal" href="#sqlalchemy.orm.interfaces.MapperProperty" title="sqlalchemy.orm.interfaces.MapperProperty"><tt class="xref py py-class docutils literal"><span class="pre">MapperProperty</span></tt></a></div>
<p>Return the class-bound descriptor corresponding to this
MapperProperty.</p>
</dd></dl>

<dl class="attribute">
<dt id="sqlalchemy.orm.properties.RelationshipProperty.info">
<tt class="descclassname">RelationshipProperty.</tt><tt class="descname">info</tt><a class="headerlink" href="#sqlalchemy.orm.properties.RelationshipProperty.info" title="Permalink to this definition">¶</a></dt>
<dd><div class="inherited-member container">
<em>inherited from the</em> <a class="reference internal" href="#sqlalchemy.orm.interfaces.MapperProperty.info" title="sqlalchemy.orm.interfaces.MapperProperty.info"><tt class="xref py py-attr docutils literal"><span class="pre">info</span></tt></a> <em>attribute of</em> <a class="reference internal" href="#sqlalchemy.orm.interfaces.MapperProperty" title="sqlalchemy.orm.interfaces.MapperProperty"><tt class="xref py py-class docutils literal"><span class="pre">MapperProperty</span></tt></a></div>
<p>Info dictionary associated with the object, allowing user-defined
data to be associated with this <a class="reference internal" href="#sqlalchemy.orm.interfaces.MapperProperty" title="sqlalchemy.orm.interfaces.MapperProperty"><tt class="xref py py-class docutils literal"><span class="pre">MapperProperty</span></tt></a>.</p>
<p>The dictionary is generated when first accessed.  Alternatively,
it can be specified as a constructor argument to the
<a class="reference internal" href="mapper_config.html#sqlalchemy.orm.column_property" title="sqlalchemy.orm.column_property"><tt class="xref py py-func docutils literal"><span class="pre">column_property()</span></tt></a>, <a class="reference internal" href="relationships.html#sqlalchemy.orm.relationship" title="sqlalchemy.orm.relationship"><tt class="xref py py-func docutils literal"><span class="pre">relationship()</span></tt></a>, or <a class="reference internal" href="mapper_config.html#sqlalchemy.orm.composite" title="sqlalchemy.orm.composite"><tt class="xref py py-func docutils literal"><span class="pre">composite()</span></tt></a>
functions.</p>
<p class="versionadded">
<span class="versionmodified">New in version 0.8: </span>Added support for .info to all
<a class="reference internal" href="#sqlalchemy.orm.interfaces.MapperProperty" title="sqlalchemy.orm.interfaces.MapperProperty"><tt class="xref py py-class docutils literal"><span class="pre">MapperProperty</span></tt></a> subclasses.</p>
<div class="admonition-see-also admonition seealso">
<p class="first admonition-title">See also</p>
<p><a class="reference internal" href="#sqlalchemy.orm.attributes.QueryableAttribute.info" title="sqlalchemy.orm.attributes.QueryableAttribute.info"><tt class="xref py py-attr docutils literal"><span class="pre">QueryableAttribute.info</span></tt></a></p>
<p class="last"><a class="reference internal" href="../core/schema.html#sqlalchemy.schema.SchemaItem.info" title="sqlalchemy.schema.SchemaItem.info"><tt class="xref py py-attr docutils literal"><span class="pre">SchemaItem.info</span></tt></a></p>
</div>
</dd></dl>

<dl class="method">
<dt id="sqlalchemy.orm.properties.RelationshipProperty.init">
<tt class="descclassname">RelationshipProperty.</tt><tt class="descname">init</tt><big>(</big><big>)</big><a class="headerlink" href="#sqlalchemy.orm.properties.RelationshipProperty.init" title="Permalink to this definition">¶</a></dt>
<dd><div class="inherited-member container">
<em>inherited from the</em> <a class="reference internal" href="#sqlalchemy.orm.interfaces.MapperProperty.init" title="sqlalchemy.orm.interfaces.MapperProperty.init"><tt class="xref py py-meth docutils literal"><span class="pre">init()</span></tt></a> <em>method of</em> <a class="reference internal" href="#sqlalchemy.orm.interfaces.MapperProperty" title="sqlalchemy.orm.interfaces.MapperProperty"><tt class="xref py py-class docutils literal"><span class="pre">MapperProperty</span></tt></a></div>
<p>Called after all mappers are created to assemble
relationships between mappers and perform other post-mapper-creation
initialization steps.</p>
</dd></dl>

<dl class="method">
<dt id="sqlalchemy.orm.properties.RelationshipProperty.is_primary">
<tt class="descclassname">RelationshipProperty.</tt><tt class="descname">is_primary</tt><big>(</big><big>)</big><a class="headerlink" href="#sqlalchemy.orm.properties.RelationshipProperty.is_primary" title="Permalink to this definition">¶</a></dt>
<dd><div class="inherited-member container">
<em>inherited from the</em> <a class="reference internal" href="#sqlalchemy.orm.interfaces.MapperProperty.is_primary" title="sqlalchemy.orm.interfaces.MapperProperty.is_primary"><tt class="xref py py-meth docutils literal"><span class="pre">is_primary()</span></tt></a> <em>method of</em> <a class="reference internal" href="#sqlalchemy.orm.interfaces.MapperProperty" title="sqlalchemy.orm.interfaces.MapperProperty"><tt class="xref py py-class docutils literal"><span class="pre">MapperProperty</span></tt></a></div>
<p>Return True if this <tt class="docutils literal"><span class="pre">MapperProperty</span></tt>&#8216;s mapper is the
primary mapper for its class.</p>
<p>This flag is used to indicate that the <tt class="docutils literal"><span class="pre">MapperProperty</span></tt> can
define attribute instrumentation for the class at the class
level (as opposed to the individual instance level).</p>
</dd></dl>

<dl class="attribute">
<dt id="sqlalchemy.orm.properties.RelationshipProperty.mapper">
<tt class="descclassname">RelationshipProperty.</tt><tt class="descname">mapper</tt><a class="headerlink" href="#sqlalchemy.orm.properties.RelationshipProperty.mapper" title="Permalink to this definition">¶</a></dt>
<dd><p>Return the targeted <a class="reference internal" href="mapper_config.html#sqlalchemy.orm.mapper.Mapper" title="sqlalchemy.orm.mapper.Mapper"><tt class="xref py py-class docutils literal"><span class="pre">Mapper</span></tt></a> for this
<a class="reference internal" href="#sqlalchemy.orm.properties.RelationshipProperty" title="sqlalchemy.orm.properties.RelationshipProperty"><tt class="xref py py-class docutils literal"><span class="pre">RelationshipProperty</span></tt></a>.</p>
<p>This is a lazy-initializing static attribute.</p>
</dd></dl>

<dl class="attribute">
<dt id="sqlalchemy.orm.properties.RelationshipProperty.table">
<tt class="descclassname">RelationshipProperty.</tt><tt class="descname">table</tt><a class="headerlink" href="#sqlalchemy.orm.properties.RelationshipProperty.table" title="Permalink to this definition">¶</a></dt>
<dd><p>Return the selectable linked to this</p>
<p class="deprecated">
<span class="versionmodified">Deprecated since version 0.7: </span>Use .target</p>
<p><a class="reference internal" href="#sqlalchemy.orm.properties.RelationshipProperty" title="sqlalchemy.orm.properties.RelationshipProperty"><tt class="xref py py-class docutils literal"><span class="pre">RelationshipProperty</span></tt></a> object&#8217;s target
<a class="reference internal" href="mapper_config.html#sqlalchemy.orm.mapper.Mapper" title="sqlalchemy.orm.mapper.Mapper"><tt class="xref py py-class docutils literal"><span class="pre">Mapper</span></tt></a>.</p>
</dd></dl>

</dd></dl>

<dl class="class">
<dt id="sqlalchemy.orm.descriptor_props.SynonymProperty">
<em class="property">class </em><tt class="descclassname">sqlalchemy.orm.descriptor_props.</tt><tt class="descname">SynonymProperty</tt><big>(</big><em>name</em>, <em>map_column=None</em>, <em>descriptor=None</em>, <em>comparator_factory=None</em>, <em>doc=None</em><big>)</big><a class="headerlink" href="#sqlalchemy.orm.descriptor_props.SynonymProperty" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <tt class="xref py py-class docutils literal"><span class="pre">sqlalchemy.orm.descriptor_props.DescriptorProperty</span></tt></p>
<dl class="method">
<dt id="sqlalchemy.orm.descriptor_props.SynonymProperty.cascade_iterator">
<tt class="descname">cascade_iterator</tt><big>(</big><em>type_</em>, <em>state</em>, <em>visited_instances=None</em>, <em>halt_on=None</em><big>)</big><a class="headerlink" href="#sqlalchemy.orm.descriptor_props.SynonymProperty.cascade_iterator" title="Permalink to this definition">¶</a></dt>
<dd><div class="inherited-member container">
<em>inherited from the</em> <a class="reference internal" href="#sqlalchemy.orm.interfaces.MapperProperty.cascade_iterator" title="sqlalchemy.orm.interfaces.MapperProperty.cascade_iterator"><tt class="xref py py-meth docutils literal"><span class="pre">cascade_iterator()</span></tt></a> <em>method of</em> <a class="reference internal" href="#sqlalchemy.orm.interfaces.MapperProperty" title="sqlalchemy.orm.interfaces.MapperProperty"><tt class="xref py py-class docutils literal"><span class="pre">MapperProperty</span></tt></a></div>
<p>Iterate through instances related to the given instance for
a particular &#8216;cascade&#8217;, starting with this MapperProperty.</p>
<p>Return an iterator3-tuples (instance, mapper, state).</p>
<p>Note that the &#8216;cascade&#8217; collection on this MapperProperty is
checked first for the given type before cascade_iterator is called.</p>
<p>See PropertyLoader for the related instance implementation.</p>
</dd></dl>

<dl class="attribute">
<dt id="sqlalchemy.orm.descriptor_props.SynonymProperty.class_attribute">
<tt class="descname">class_attribute</tt><a class="headerlink" href="#sqlalchemy.orm.descriptor_props.SynonymProperty.class_attribute" title="Permalink to this definition">¶</a></dt>
<dd><div class="inherited-member container">
<em>inherited from the</em> <a class="reference internal" href="#sqlalchemy.orm.interfaces.MapperProperty.class_attribute" title="sqlalchemy.orm.interfaces.MapperProperty.class_attribute"><tt class="xref py py-attr docutils literal"><span class="pre">class_attribute</span></tt></a> <em>attribute of</em> <a class="reference internal" href="#sqlalchemy.orm.interfaces.MapperProperty" title="sqlalchemy.orm.interfaces.MapperProperty"><tt class="xref py py-class docutils literal"><span class="pre">MapperProperty</span></tt></a></div>
<p>Return the class-bound descriptor corresponding to this
MapperProperty.</p>
</dd></dl>

<dl class="method">
<dt id="sqlalchemy.orm.descriptor_props.SynonymProperty.compare">
<tt class="descname">compare</tt><big>(</big><em>operator</em>, <em>value</em>, <em>**kw</em><big>)</big><a class="headerlink" href="#sqlalchemy.orm.descriptor_props.SynonymProperty.compare" title="Permalink to this definition">¶</a></dt>
<dd><div class="inherited-member container">
<em>inherited from the</em> <a class="reference internal" href="#sqlalchemy.orm.interfaces.MapperProperty.compare" title="sqlalchemy.orm.interfaces.MapperProperty.compare"><tt class="xref py py-meth docutils literal"><span class="pre">compare()</span></tt></a> <em>method of</em> <a class="reference internal" href="#sqlalchemy.orm.interfaces.MapperProperty" title="sqlalchemy.orm.interfaces.MapperProperty"><tt class="xref py py-class docutils literal"><span class="pre">MapperProperty</span></tt></a></div>
<p>Return a compare operation for the columns represented by
this <tt class="docutils literal"><span class="pre">MapperProperty</span></tt> to the given value, which may be a
column value or an instance.  &#8216;operator&#8217; is an operator from
the operators module, or from sql.Comparator.</p>
<p>By default uses the PropComparator attached to this MapperProperty
under the attribute name &#8220;comparator&#8221;.</p>
</dd></dl>

<dl class="method">
<dt id="sqlalchemy.orm.descriptor_props.SynonymProperty.create_row_processor">
<tt class="descname">create_row_processor</tt><big>(</big><em>context</em>, <em>path</em>, <em>mapper</em>, <em>row</em>, <em>adapter</em><big>)</big><a class="headerlink" href="#sqlalchemy.orm.descriptor_props.SynonymProperty.create_row_processor" title="Permalink to this definition">¶</a></dt>
<dd><div class="inherited-member container">
<em>inherited from the</em> <a class="reference internal" href="#sqlalchemy.orm.interfaces.MapperProperty.create_row_processor" title="sqlalchemy.orm.interfaces.MapperProperty.create_row_processor"><tt class="xref py py-meth docutils literal"><span class="pre">create_row_processor()</span></tt></a> <em>method of</em> <a class="reference internal" href="#sqlalchemy.orm.interfaces.MapperProperty" title="sqlalchemy.orm.interfaces.MapperProperty"><tt class="xref py py-class docutils literal"><span class="pre">MapperProperty</span></tt></a></div>
<p>Return a 3-tuple consisting of three row processing functions.</p>
</dd></dl>

<dl class="method">
<dt id="sqlalchemy.orm.descriptor_props.SynonymProperty.do_init">
<tt class="descname">do_init</tt><big>(</big><big>)</big><a class="headerlink" href="#sqlalchemy.orm.descriptor_props.SynonymProperty.do_init" title="Permalink to this definition">¶</a></dt>
<dd><div class="inherited-member container">
<em>inherited from the</em> <a class="reference internal" href="#sqlalchemy.orm.interfaces.MapperProperty.do_init" title="sqlalchemy.orm.interfaces.MapperProperty.do_init"><tt class="xref py py-meth docutils literal"><span class="pre">do_init()</span></tt></a> <em>method of</em> <a class="reference internal" href="#sqlalchemy.orm.interfaces.MapperProperty" title="sqlalchemy.orm.interfaces.MapperProperty"><tt class="xref py py-class docutils literal"><span class="pre">MapperProperty</span></tt></a></div>
<p>Perform subclass-specific initialization post-mapper-creation
steps.</p>
<p>This is a template method called by the <tt class="docutils literal"><span class="pre">MapperProperty</span></tt>
object&#8217;s init() method.</p>
</dd></dl>

<dl class="attribute">
<dt id="sqlalchemy.orm.descriptor_props.SynonymProperty.info">
<tt class="descname">info</tt><a class="headerlink" href="#sqlalchemy.orm.descriptor_props.SynonymProperty.info" title="Permalink to this definition">¶</a></dt>
<dd><div class="inherited-member container">
<em>inherited from the</em> <a class="reference internal" href="#sqlalchemy.orm.interfaces.MapperProperty.info" title="sqlalchemy.orm.interfaces.MapperProperty.info"><tt class="xref py py-attr docutils literal"><span class="pre">info</span></tt></a> <em>attribute of</em> <a class="reference internal" href="#sqlalchemy.orm.interfaces.MapperProperty" title="sqlalchemy.orm.interfaces.MapperProperty"><tt class="xref py py-class docutils literal"><span class="pre">MapperProperty</span></tt></a></div>
<p>Info dictionary associated with the object, allowing user-defined
data to be associated with this <a class="reference internal" href="#sqlalchemy.orm.interfaces.MapperProperty" title="sqlalchemy.orm.interfaces.MapperProperty"><tt class="xref py py-class docutils literal"><span class="pre">MapperProperty</span></tt></a>.</p>
<p>The dictionary is generated when first accessed.  Alternatively,
it can be specified as a constructor argument to the
<a class="reference internal" href="mapper_config.html#sqlalchemy.orm.column_property" title="sqlalchemy.orm.column_property"><tt class="xref py py-func docutils literal"><span class="pre">column_property()</span></tt></a>, <a class="reference internal" href="relationships.html#sqlalchemy.orm.relationship" title="sqlalchemy.orm.relationship"><tt class="xref py py-func docutils literal"><span class="pre">relationship()</span></tt></a>, or <a class="reference internal" href="mapper_config.html#sqlalchemy.orm.composite" title="sqlalchemy.orm.composite"><tt class="xref py py-func docutils literal"><span class="pre">composite()</span></tt></a>
functions.</p>
<p class="versionadded">
<span class="versionmodified">New in version 0.8: </span>Added support for .info to all
<a class="reference internal" href="#sqlalchemy.orm.interfaces.MapperProperty" title="sqlalchemy.orm.interfaces.MapperProperty"><tt class="xref py py-class docutils literal"><span class="pre">MapperProperty</span></tt></a> subclasses.</p>
<div class="admonition-see-also admonition seealso">
<p class="first admonition-title">See also</p>
<p><a class="reference internal" href="#sqlalchemy.orm.attributes.QueryableAttribute.info" title="sqlalchemy.orm.attributes.QueryableAttribute.info"><tt class="xref py py-attr docutils literal"><span class="pre">QueryableAttribute.info</span></tt></a></p>
<p class="last"><a class="reference internal" href="../core/schema.html#sqlalchemy.schema.SchemaItem.info" title="sqlalchemy.schema.SchemaItem.info"><tt class="xref py py-attr docutils literal"><span class="pre">SchemaItem.info</span></tt></a></p>
</div>
</dd></dl>

<dl class="method">
<dt id="sqlalchemy.orm.descriptor_props.SynonymProperty.init">
<tt class="descname">init</tt><big>(</big><big>)</big><a class="headerlink" href="#sqlalchemy.orm.descriptor_props.SynonymProperty.init" title="Permalink to this definition">¶</a></dt>
<dd><div class="inherited-member container">
<em>inherited from the</em> <a class="reference internal" href="#sqlalchemy.orm.interfaces.MapperProperty.init" title="sqlalchemy.orm.interfaces.MapperProperty.init"><tt class="xref py py-meth docutils literal"><span class="pre">init()</span></tt></a> <em>method of</em> <a class="reference internal" href="#sqlalchemy.orm.interfaces.MapperProperty" title="sqlalchemy.orm.interfaces.MapperProperty"><tt class="xref py py-class docutils literal"><span class="pre">MapperProperty</span></tt></a></div>
<p>Called after all mappers are created to assemble
relationships between mappers and perform other post-mapper-creation
initialization steps.</p>
</dd></dl>

<dl class="method">
<dt id="sqlalchemy.orm.descriptor_props.SynonymProperty.is_primary">
<tt class="descname">is_primary</tt><big>(</big><big>)</big><a class="headerlink" href="#sqlalchemy.orm.descriptor_props.SynonymProperty.is_primary" title="Permalink to this definition">¶</a></dt>
<dd><div class="inherited-member container">
<em>inherited from the</em> <a class="reference internal" href="#sqlalchemy.orm.interfaces.MapperProperty.is_primary" title="sqlalchemy.orm.interfaces.MapperProperty.is_primary"><tt class="xref py py-meth docutils literal"><span class="pre">is_primary()</span></tt></a> <em>method of</em> <a class="reference internal" href="#sqlalchemy.orm.interfaces.MapperProperty" title="sqlalchemy.orm.interfaces.MapperProperty"><tt class="xref py py-class docutils literal"><span class="pre">MapperProperty</span></tt></a></div>
<p>Return True if this <tt class="docutils literal"><span class="pre">MapperProperty</span></tt>&#8216;s mapper is the
primary mapper for its class.</p>
<p>This flag is used to indicate that the <tt class="docutils literal"><span class="pre">MapperProperty</span></tt> can
define attribute instrumentation for the class at the class
level (as opposed to the individual instance level).</p>
</dd></dl>

<dl class="method">
<dt id="sqlalchemy.orm.descriptor_props.SynonymProperty.merge">
<tt class="descname">merge</tt><big>(</big><em>session</em>, <em>source_state</em>, <em>source_dict</em>, <em>dest_state</em>, <em>dest_dict</em>, <em>load</em>, <em>_recursive</em><big>)</big><a class="headerlink" href="#sqlalchemy.orm.descriptor_props.SynonymProperty.merge" title="Permalink to this definition">¶</a></dt>
<dd><div class="inherited-member container">
<em>inherited from the</em> <a class="reference internal" href="#sqlalchemy.orm.interfaces.MapperProperty.merge" title="sqlalchemy.orm.interfaces.MapperProperty.merge"><tt class="xref py py-meth docutils literal"><span class="pre">merge()</span></tt></a> <em>method of</em> <a class="reference internal" href="#sqlalchemy.orm.interfaces.MapperProperty" title="sqlalchemy.orm.interfaces.MapperProperty"><tt class="xref py py-class docutils literal"><span class="pre">MapperProperty</span></tt></a></div>
<p>Merge the attribute represented by this <tt class="docutils literal"><span class="pre">MapperProperty</span></tt>
from source to destination object</p>
</dd></dl>

<dl class="method">
<dt id="sqlalchemy.orm.descriptor_props.SynonymProperty.post_instrument_class">
<tt class="descname">post_instrument_class</tt><big>(</big><em>mapper</em><big>)</big><a class="headerlink" href="#sqlalchemy.orm.descriptor_props.SynonymProperty.post_instrument_class" title="Permalink to this definition">¶</a></dt>
<dd><div class="inherited-member container">
<em>inherited from the</em> <a class="reference internal" href="#sqlalchemy.orm.interfaces.MapperProperty.post_instrument_class" title="sqlalchemy.orm.interfaces.MapperProperty.post_instrument_class"><tt class="xref py py-meth docutils literal"><span class="pre">post_instrument_class()</span></tt></a> <em>method of</em> <a class="reference internal" href="#sqlalchemy.orm.interfaces.MapperProperty" title="sqlalchemy.orm.interfaces.MapperProperty"><tt class="xref py py-class docutils literal"><span class="pre">MapperProperty</span></tt></a></div>
<p>Perform instrumentation adjustments that need to occur
after init() has completed.</p>
</dd></dl>

<dl class="method">
<dt id="sqlalchemy.orm.descriptor_props.SynonymProperty.setup">
<tt class="descname">setup</tt><big>(</big><em>context</em>, <em>entity</em>, <em>path</em>, <em>adapter</em>, <em>**kwargs</em><big>)</big><a class="headerlink" href="#sqlalchemy.orm.descriptor_props.SynonymProperty.setup" title="Permalink to this definition">¶</a></dt>
<dd><div class="inherited-member container">
<em>inherited from the</em> <a class="reference internal" href="#sqlalchemy.orm.interfaces.MapperProperty.setup" title="sqlalchemy.orm.interfaces.MapperProperty.setup"><tt class="xref py py-meth docutils literal"><span class="pre">setup()</span></tt></a> <em>method of</em> <a class="reference internal" href="#sqlalchemy.orm.interfaces.MapperProperty" title="sqlalchemy.orm.interfaces.MapperProperty"><tt class="xref py py-class docutils literal"><span class="pre">MapperProperty</span></tt></a></div>
<p>Called by Query for the purposes of constructing a SQL statement.</p>
<p>Each MapperProperty associated with the target mapper processes the
statement referenced by the query context, adding columns and/or
criterion as appropriate.</p>
</dd></dl>

</dd></dl>

<dl class="class">
<dt id="sqlalchemy.orm.query.QueryContext">
<em class="property">class </em><tt class="descclassname">sqlalchemy.orm.query.</tt><tt class="descname">QueryContext</tt><big>(</big><em>query</em><big>)</big><a class="headerlink" href="#sqlalchemy.orm.query.QueryContext" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <tt class="xref py py-class docutils literal"><span class="pre">object</span></tt></p>
</dd></dl>

<dl class="class">
<dt id="sqlalchemy.orm.attributes.QueryableAttribute">
<em class="property">class </em><tt class="descclassname">sqlalchemy.orm.attributes.</tt><tt class="descname">QueryableAttribute</tt><big>(</big><em>class_</em>, <em>key</em>, <em>impl=None</em>, <em>comparator=None</em>, <em>parententity=None</em>, <em>of_type=None</em><big>)</big><a class="headerlink" href="#sqlalchemy.orm.attributes.QueryableAttribute" title="Permalink to this definition">¶</a></dt>
<dd><p>Bases: <tt class="xref py py-class docutils literal"><span class="pre">sqlalchemy.orm.interfaces._MappedAttribute</span></tt>, <a class="reference internal" href="#sqlalchemy.orm.interfaces._InspectionAttr" title="sqlalchemy.orm.interfaces._InspectionAttr"><tt class="xref py py-class docutils literal"><span class="pre">sqlalchemy.orm.interfaces._InspectionAttr</span></tt></a>, <a class="reference internal" href="#sqlalchemy.orm.interfaces.PropComparator" title="sqlalchemy.orm.interfaces.PropComparator"><tt class="xref py py-class docutils literal"><span class="pre">sqlalchemy.orm.interfaces.PropComparator</span></tt></a></p>
<p>Base class for <a class="reference internal" href="../glossary.html#term-descriptor"><em class="xref std std-term">descriptor</em></a> objects that intercept
attribute events on behalf of a <a class="reference internal" href="#sqlalchemy.orm.interfaces.MapperProperty" title="sqlalchemy.orm.interfaces.MapperProperty"><tt class="xref py py-class docutils literal"><span class="pre">MapperProperty</span></tt></a>
object.  The actual <a class="reference internal" href="#sqlalchemy.orm.interfaces.MapperProperty" title="sqlalchemy.orm.interfaces.MapperProperty"><tt class="xref py py-class docutils literal"><span class="pre">MapperProperty</span></tt></a> is accessible
via the <a class="reference internal" href="#sqlalchemy.orm.attributes.QueryableAttribute.property" title="sqlalchemy.orm.attributes.QueryableAttribute.property"><tt class="xref py py-attr docutils literal"><span class="pre">QueryableAttribute.property</span></tt></a>
attribute.</p>
<div class="admonition-see-also admonition seealso">
<p class="first admonition-title">See also</p>
<p><a class="reference internal" href="#sqlalchemy.orm.attributes.InstrumentedAttribute" title="sqlalchemy.orm.attributes.InstrumentedAttribute"><tt class="xref py py-class docutils literal"><span class="pre">InstrumentedAttribute</span></tt></a></p>
<p><a class="reference internal" href="#sqlalchemy.orm.interfaces.MapperProperty" title="sqlalchemy.orm.interfaces.MapperProperty"><tt class="xref py py-class docutils literal"><span class="pre">MapperProperty</span></tt></a></p>
<p><a class="reference internal" href="mapper_config.html#sqlalchemy.orm.mapper.Mapper.all_orm_descriptors" title="sqlalchemy.orm.mapper.Mapper.all_orm_descriptors"><tt class="xref py py-attr docutils literal"><span class="pre">Mapper.all_orm_descriptors</span></tt></a></p>
<p class="last"><a class="reference internal" href="mapper_config.html#sqlalchemy.orm.mapper.Mapper.attrs" title="sqlalchemy.orm.mapper.Mapper.attrs"><tt class="xref py py-attr docutils literal"><span class="pre">Mapper.attrs</span></tt></a></p>
</div>
<dl class="method">
<dt id="sqlalchemy.orm.attributes.QueryableAttribute.__eq__">
<tt class="descname">__eq__</tt><big>(</big><em>other</em><big>)</big><a class="headerlink" href="#sqlalchemy.orm.attributes.QueryableAttribute.__eq__" title="Permalink to this definition">¶</a></dt>
<dd><div class="inherited-member container">
<em>inherited from the</em> <a class="reference internal" href="../core/expression_api.html#sqlalchemy.sql.operators.ColumnOperators.__eq__" title="sqlalchemy.sql.operators.ColumnOperators.__eq__"><tt class="xref py py-meth docutils literal"><span class="pre">__eq__()</span></tt></a> <em>method of</em> <a class="reference internal" href="../core/expression_api.html#sqlalchemy.sql.operators.ColumnOperators" title="sqlalchemy.sql.operators.ColumnOperators"><tt class="xref py py-class docutils literal"><span class="pre">ColumnOperators</span></tt></a></div>
<p>Implement the <tt class="docutils literal"><span class="pre">==</span></tt> operator.</p>
<p>In a column context, produces the clause <tt class="docutils literal"><span class="pre">a</span> <span class="pre">=</span> <span class="pre">b</span></tt>.
If the target is <tt class="docutils literal"><span class="pre">None</span></tt>, produces <tt class="docutils literal"><span class="pre">a</span> <span class="pre">IS</span> <span class="pre">NULL</span></tt>.</p>
</dd></dl>

<dl class="method">
<dt id="sqlalchemy.orm.attributes.QueryableAttribute.__le__">
<tt class="descname">__le__</tt><big>(</big><em>other</em><big>)</big><a class="headerlink" href="#sqlalchemy.orm.attributes.QueryableAttribute.__le__" title="Permalink to this definition">¶</a></dt>
<dd><div class="inherited-member container">
<em>inherited from the</em> <a class="reference internal" href="../core/expression_api.html#sqlalchemy.sql.operators.ColumnOperators.__le__" title="sqlalchemy.sql.operators.ColumnOperators.__le__"><tt class="xref py py-meth docutils literal"><span class="pre">__le__()</span></tt></a> <em>method of</em> <a class="reference internal" href="../core/expression_api.html#sqlalchemy.sql.operators.ColumnOperators" title="sqlalchemy.sql.operators.ColumnOperators"><tt class="xref py py-class docutils literal"><span class="pre">ColumnOperators</span></tt></a></div>
<p>Implement the <tt class="docutils literal"><span class="pre">&lt;=</span></tt> operator.</p>
<p>In a column context, produces the clause <tt class="docutils literal"><span class="pre">a</span> <span class="pre">&lt;=</span> <span class="pre">b</span></tt>.</p>
</dd></dl>

<dl class="method">
<dt id="sqlalchemy.orm.attributes.QueryableAttribute.__lt__">
<tt class="descname">__lt__</tt><big>(</big><em>other</em><big>)</big><a class="headerlink" href="#sqlalchemy.orm.attributes.QueryableAttribute.__lt__" title="Permalink to this definition">¶</a></dt>
<dd><div class="inherited-member container">
<em>inherited from the</em> <a class="reference internal" href="../core/expression_api.html#sqlalchemy.sql.operators.ColumnOperators.__lt__" title="sqlalchemy.sql.operators.ColumnOperators.__lt__"><tt class="xref py py-meth docutils literal"><span class="pre">__lt__()</span></tt></a> <em>method of</em> <a class="reference internal" href="../core/expression_api.html#sqlalchemy.sql.operators.ColumnOperators" title="sqlalchemy.sql.operators.ColumnOperators"><tt class="xref py py-class docutils literal"><span class="pre">ColumnOperators</span></tt></a></div>
<p>Implement the <tt class="docutils literal"><span class="pre">&lt;</span></tt> operator.</p>
<p>In a column context, produces the clause <tt class="docutils literal"><span class="pre">a</span> <span class="pre">&lt;</span> <span class="pre">b</span></tt>.</p>
</dd></dl>

<dl class="method">
<dt id="sqlalchemy.orm.attributes.QueryableAttribute.__ne__">
<tt class="descname">__ne__</tt><big>(</big><em>other</em><big>)</big><a class="headerlink" href="#sqlalchemy.orm.attributes.QueryableAttribute.__ne__" title="Permalink to this definition">¶</a></dt>
<dd><div class="inherited-member container">
<em>inherited from the</em> <a class="reference internal" href="../core/expression_api.html#sqlalchemy.sql.operators.ColumnOperators.__ne__" title="sqlalchemy.sql.operators.ColumnOperators.__ne__"><tt class="xref py py-meth docutils literal"><span class="pre">__ne__()</span></tt></a> <em>method of</em> <a class="reference internal" href="../core/expression_api.html#sqlalchemy.sql.operators.ColumnOperators" title="sqlalchemy.sql.operators.ColumnOperators"><tt class="xref py py-class docutils literal"><span class="pre">ColumnOperators</span></tt></a></div>
<p>Implement the <tt class="docutils literal"><span class="pre">!=</span></tt> operator.</p>
<p>In a column context, produces the clause <tt class="docutils literal"><span class="pre">a</span> <span class="pre">!=</span> <span class="pre">b</span></tt>.
If the target is <tt class="docutils literal"><span class="pre">None</span></tt>, produces <tt class="docutils literal"><span class="pre">a</span> <span class="pre">IS</span> <span class="pre">NOT</span> <span class="pre">NULL</span></tt>.</p>
</dd></dl>

<dl class="method">
<dt id="sqlalchemy.orm.attributes.QueryableAttribute.adapted">
<tt class="descname">adapted</tt><big>(</big><em>adapter</em><big>)</big><a class="headerlink" href="#sqlalchemy.orm.attributes.QueryableAttribute.adapted" title="Permalink to this definition">¶</a></dt>
<dd><div class="inherited-member container">
<em>inherited from the</em> <a class="reference internal" href="#sqlalchemy.orm.interfaces.PropComparator.adapted" title="sqlalchemy.orm.interfaces.PropComparator.adapted"><tt class="xref py py-meth docutils literal"><span class="pre">adapted()</span></tt></a> <em>method of</em> <a class="reference internal" href="#sqlalchemy.orm.interfaces.PropComparator" title="sqlalchemy.orm.interfaces.PropComparator"><tt class="xref py py-class docutils literal"><span class="pre">PropComparator</span></tt></a></div>
<p>Return a copy of this PropComparator which will use the given
adaption function on the local side of generated expressions.</p>
</dd></dl>

<dl class="method">
<dt id="sqlalchemy.orm.attributes.QueryableAttribute.any">
<tt class="descname">any</tt><big>(</big><em>criterion=None</em>, <em>**kwargs</em><big>)</big><a class="headerlink" href="#sqlalchemy.orm.attributes.QueryableAttribute.any" title="Permalink to this definition">¶</a></dt>
<dd><div class="inherited-member container">
<em>inherited from the</em> <a class="reference internal" href="#sqlalchemy.orm.interfaces.PropComparator.any" title="sqlalchemy.orm.interfaces.PropComparator.any"><tt class="xref py py-meth docutils literal"><span class="pre">any()</span></tt></a> <em>method of</em> <a class="reference internal" href="#sqlalchemy.orm.interfaces.PropComparator" title="sqlalchemy.orm.interfaces.PropComparator"><tt class="xref py py-class docutils literal"><span class="pre">PropComparator</span></tt></a></div>
<p>Return true if this collection contains any member that meets the
given criterion.</p>
<p>The usual implementation of <tt class="docutils literal"><span class="pre">any()</span></tt> is
<a class="reference internal" href="#sqlalchemy.orm.properties.RelationshipProperty.Comparator.any" title="sqlalchemy.orm.properties.RelationshipProperty.Comparator.any"><tt class="xref py py-meth docutils literal"><span class="pre">RelationshipProperty.Comparator.any()</span></tt></a>.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
<li><strong>criterion</strong> &#8211; an optional ClauseElement formulated against the
member class&#8217; table or attributes.</li>
<li><strong>**kwargs</strong> &#8211; key/value pairs corresponding to member class
attribute names which will be compared via equality to the
corresponding values.</li>
</ul>
</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="sqlalchemy.orm.attributes.QueryableAttribute.asc">
<tt class="descname">asc</tt><big>(</big><big>)</big><a class="headerlink" href="#sqlalchemy.orm.attributes.QueryableAttribute.asc" title="Permalink to this definition">¶</a></dt>
<dd><div class="inherited-member container">
<em>inherited from the</em> <a class="reference internal" href="../core/expression_api.html#sqlalchemy.sql.operators.ColumnOperators.asc" title="sqlalchemy.sql.operators.ColumnOperators.asc"><tt class="xref py py-meth docutils literal"><span class="pre">asc()</span></tt></a> <em>method of</em> <a class="reference internal" href="../core/expression_api.html#sqlalchemy.sql.operators.ColumnOperators" title="sqlalchemy.sql.operators.ColumnOperators"><tt class="xref py py-class docutils literal"><span class="pre">ColumnOperators</span></tt></a></div>
<p>Produce a <a class="reference internal" href="../core/expression_api.html#sqlalchemy.sql.expression.asc" title="sqlalchemy.sql.expression.asc"><tt class="xref py py-func docutils literal"><span class="pre">asc()</span></tt></a> clause against the
parent object.</p>
</dd></dl>

<dl class="method">
<dt id="sqlalchemy.orm.attributes.QueryableAttribute.between">
<tt class="descname">between</tt><big>(</big><em>cleft</em>, <em>cright</em><big>)</big><a class="headerlink" href="#sqlalchemy.orm.attributes.QueryableAttribute.between" title="Permalink to this definition">¶</a></dt>
<dd><div class="inherited-member container">
<em>inherited from the</em> <a class="reference internal" href="../core/expression_api.html#sqlalchemy.sql.operators.ColumnOperators.between" title="sqlalchemy.sql.operators.ColumnOperators.between"><tt class="xref py py-meth docutils literal"><span class="pre">between()</span></tt></a> <em>method of</em> <a class="reference internal" href="../core/expression_api.html#sqlalchemy.sql.operators.ColumnOperators" title="sqlalchemy.sql.operators.ColumnOperators"><tt class="xref py py-class docutils literal"><span class="pre">ColumnOperators</span></tt></a></div>
<p>Produce a <a class="reference internal" href="../core/expression_api.html#sqlalchemy.sql.expression.between" title="sqlalchemy.sql.expression.between"><tt class="xref py py-func docutils literal"><span class="pre">between()</span></tt></a> clause against
the parent object, given the lower and upper range.</p>
</dd></dl>

<dl class="method">
<dt id="sqlalchemy.orm.attributes.QueryableAttribute.collate">
<tt class="descname">collate</tt><big>(</big><em>collation</em><big>)</big><a class="headerlink" href="#sqlalchemy.orm.attributes.QueryableAttribute.collate" title="Permalink to this definition">¶</a></dt>
<dd><div class="inherited-member container">
<em>inherited from the</em> <a class="reference internal" href="../core/expression_api.html#sqlalchemy.sql.operators.ColumnOperators.collate" title="sqlalchemy.sql.operators.ColumnOperators.collate"><tt class="xref py py-meth docutils literal"><span class="pre">collate()</span></tt></a> <em>method of</em> <a class="reference internal" href="../core/expression_api.html#sqlalchemy.sql.operators.ColumnOperators" title="sqlalchemy.sql.operators.ColumnOperators"><tt class="xref py py-class docutils literal"><span class="pre">ColumnOperators</span></tt></a></div>
<p>Produce a <a class="reference internal" href="../core/expression_api.html#sqlalchemy.sql.expression.collate" title="sqlalchemy.sql.expression.collate"><tt class="xref py py-func docutils literal"><span class="pre">collate()</span></tt></a> clause against
the parent object, given the collation string.</p>
</dd></dl>

<dl class="method">
<dt id="sqlalchemy.orm.attributes.QueryableAttribute.concat">
<tt class="descname">concat</tt><big>(</big><em>other</em><big>)</big><a class="headerlink" href="#sqlalchemy.orm.attributes.QueryableAttribute.concat" title="Permalink to this definition">¶</a></dt>
<dd><div class="inherited-member container">
<em>inherited from the</em> <a class="reference internal" href="../core/expression_api.html#sqlalchemy.sql.operators.ColumnOperators.concat" title="sqlalchemy.sql.operators.ColumnOperators.concat"><tt class="xref py py-meth docutils literal"><span class="pre">concat()</span></tt></a> <em>method of</em> <a class="reference internal" href="../core/expression_api.html#sqlalchemy.sql.operators.ColumnOperators" title="sqlalchemy.sql.operators.ColumnOperators"><tt class="xref py py-class docutils literal"><span class="pre">ColumnOperators</span></tt></a></div>
<p>Implement the &#8216;concat&#8217; operator.</p>
<p>In a column context, produces the clause <tt class="docutils literal"><span class="pre">a</span> <span class="pre">||</span> <span class="pre">b</span></tt>,
or uses the <tt class="docutils literal"><span class="pre">concat()</span></tt> operator on MySQL.</p>
</dd></dl>

<dl class="method">
<dt id="sqlalchemy.orm.attributes.QueryableAttribute.contains">
<tt class="descname">contains</tt><big>(</big><em>other</em>, <em>**kwargs</em><big>)</big><a class="headerlink" href="#sqlalchemy.orm.attributes.QueryableAttribute.contains" title="Permalink to this definition">¶</a></dt>
<dd><div class="inherited-member container">
<em>inherited from the</em> <a class="reference internal" href="../core/expression_api.html#sqlalchemy.sql.operators.ColumnOperators.contains" title="sqlalchemy.sql.operators.ColumnOperators.contains"><tt class="xref py py-meth docutils literal"><span class="pre">contains()</span></tt></a> <em>method of</em> <a class="reference internal" href="../core/expression_api.html#sqlalchemy.sql.operators.ColumnOperators" title="sqlalchemy.sql.operators.ColumnOperators"><tt class="xref py py-class docutils literal"><span class="pre">ColumnOperators</span></tt></a></div>
<p>Implement the &#8216;contains&#8217; operator.</p>
<p>In a column context, produces the clause <tt class="docutils literal"><span class="pre">LIKE</span> <span class="pre">'%&lt;other&gt;%'</span></tt></p>
</dd></dl>

<dl class="method">
<dt id="sqlalchemy.orm.attributes.QueryableAttribute.desc">
<tt class="descname">desc</tt><big>(</big><big>)</big><a class="headerlink" href="#sqlalchemy.orm.attributes.QueryableAttribute.desc" title="Permalink to this definition">¶</a></dt>
<dd><div class="inherited-member container">
<em>inherited from the</em> <a class="reference internal" href="../core/expression_api.html#sqlalchemy.sql.operators.ColumnOperators.desc" title="sqlalchemy.sql.operators.ColumnOperators.desc"><tt class="xref py py-meth docutils literal"><span class="pre">desc()</span></tt></a> <em>method of</em> <a class="reference internal" href="../core/expression_api.html#sqlalchemy.sql.operators.ColumnOperators" title="sqlalchemy.sql.operators.ColumnOperators"><tt class="xref py py-class docutils literal"><span class="pre">ColumnOperators</span></tt></a></div>
<p>Produce a <a class="reference internal" href="../core/expression_api.html#sqlalchemy.sql.expression.desc" title="sqlalchemy.sql.expression.desc"><tt class="xref py py-func docutils literal"><span class="pre">desc()</span></tt></a> clause against the
parent object.</p>
</dd></dl>

<dl class="method">
<dt id="sqlalchemy.orm.attributes.QueryableAttribute.distinct">
<tt class="descname">distinct</tt><big>(</big><big>)</big><a class="headerlink" href="#sqlalchemy.orm.attributes.QueryableAttribute.distinct" title="Permalink to this definition">¶</a></dt>
<dd><div class="inherited-member container">
<em>inherited from the</em> <a class="reference internal" href="../core/expression_api.html#sqlalchemy.sql.operators.ColumnOperators.distinct" title="sqlalchemy.sql.operators.ColumnOperators.distinct"><tt class="xref py py-meth docutils literal"><span class="pre">distinct()</span></tt></a> <em>method of</em> <a class="reference internal" href="../core/expression_api.html#sqlalchemy.sql.operators.ColumnOperators" title="sqlalchemy.sql.operators.ColumnOperators"><tt class="xref py py-class docutils literal"><span class="pre">ColumnOperators</span></tt></a></div>
<p>Produce a <a class="reference internal" href="../core/expression_api.html#sqlalchemy.sql.expression.distinct" title="sqlalchemy.sql.expression.distinct"><tt class="xref py py-func docutils literal"><span class="pre">distinct()</span></tt></a> clause against the
parent object.</p>
</dd></dl>

<dl class="method">
<dt id="sqlalchemy.orm.attributes.QueryableAttribute.endswith">
<tt class="descname">endswith</tt><big>(</big><em>other</em>, <em>**kwargs</em><big>)</big><a class="headerlink" href="#sqlalchemy.orm.attributes.QueryableAttribute.endswith" title="Permalink to this definition">¶</a></dt>
<dd><div class="inherited-member container">
<em>inherited from the</em> <a class="reference internal" href="../core/expression_api.html#sqlalchemy.sql.operators.ColumnOperators.endswith" title="sqlalchemy.sql.operators.ColumnOperators.endswith"><tt class="xref py py-meth docutils literal"><span class="pre">endswith()</span></tt></a> <em>method of</em> <a class="reference internal" href="../core/expression_api.html#sqlalchemy.sql.operators.ColumnOperators" title="sqlalchemy.sql.operators.ColumnOperators"><tt class="xref py py-class docutils literal"><span class="pre">ColumnOperators</span></tt></a></div>
<p>Implement the &#8216;endswith&#8217; operator.</p>
<p>In a column context, produces the clause <tt class="docutils literal"><span class="pre">LIKE</span> <span class="pre">'%&lt;other&gt;'</span></tt></p>
</dd></dl>

<dl class="method">
<dt id="sqlalchemy.orm.attributes.QueryableAttribute.has">
<tt class="descname">has</tt><big>(</big><em>criterion=None</em>, <em>**kwargs</em><big>)</big><a class="headerlink" href="#sqlalchemy.orm.attributes.QueryableAttribute.has" title="Permalink to this definition">¶</a></dt>
<dd><div class="inherited-member container">
<em>inherited from the</em> <a class="reference internal" href="#sqlalchemy.orm.interfaces.PropComparator.has" title="sqlalchemy.orm.interfaces.PropComparator.has"><tt class="xref py py-meth docutils literal"><span class="pre">has()</span></tt></a> <em>method of</em> <a class="reference internal" href="#sqlalchemy.orm.interfaces.PropComparator" title="sqlalchemy.orm.interfaces.PropComparator"><tt class="xref py py-class docutils literal"><span class="pre">PropComparator</span></tt></a></div>
<p>Return true if this element references a member which meets the
given criterion.</p>
<p>The usual implementation of <tt class="docutils literal"><span class="pre">has()</span></tt> is
<a class="reference internal" href="#sqlalchemy.orm.properties.RelationshipProperty.Comparator.has" title="sqlalchemy.orm.properties.RelationshipProperty.Comparator.has"><tt class="xref py py-meth docutils literal"><span class="pre">RelationshipProperty.Comparator.has()</span></tt></a>.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
<li><strong>criterion</strong> &#8211; an optional ClauseElement formulated against the
member class&#8217; table or attributes.</li>
<li><strong>**kwargs</strong> &#8211; key/value pairs corresponding to member class
attribute names which will be compared via equality to the
corresponding values.</li>
</ul>
</td>
</tr>
</tbody>
</table>
</dd></dl>

<dl class="method">
<dt id="sqlalchemy.orm.attributes.QueryableAttribute.ilike">
<tt class="descname">ilike</tt><big>(</big><em>other</em>, <em>escape=None</em><big>)</big><a class="headerlink" href="#sqlalchemy.orm.attributes.QueryableAttribute.ilike" title="Permalink to this definition">¶</a></dt>
<dd><div class="inherited-member container">
<em>inherited from the</em> <a class="reference internal" href="../core/expression_api.html#sqlalchemy.sql.operators.ColumnOperators.ilike" title="sqlalchemy.sql.operators.ColumnOperators.ilike"><tt class="xref py py-meth docutils literal"><span class="pre">ilike()</span></tt></a> <em>method of</em> <a class="reference internal" href="../core/expression_api.html#sqlalchemy.sql.operators.ColumnOperators" title="sqlalchemy.sql.operators.ColumnOperators"><tt class="xref py py-class docutils literal"><span class="pre">ColumnOperators</span></tt></a></div>
<p>Implement the <tt class="docutils literal"><span class="pre">ilike</span></tt> operator.</p>
<p>In a column context, produces the clause <tt class="docutils literal"><span class="pre">a</span> <span class="pre">ILIKE</span> <span class="pre">other</span></tt>.</p>
<p>E.g.:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="n">select</span><span class="p">([</span><span class="n">sometable</span><span class="p">])</span><span class="o">.</span><span class="n">where</span><span class="p">(</span><span class="n">sometable</span><span class="o">.</span><span class="n">c</span><span class="o">.</span><span class="n">column</span><span class="o">.</span><span class="n">ilike</span><span class="p">(</span><span class="s">&quot;</span><span class="si">%f</span><span class="s">oobar%&quot;</span><span class="p">))</span></pre></div>
</div>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
<li><strong>other</strong> &#8211; expression to be compared</li>
<li><strong>escape</strong> &#8211; <p>optional escape character, renders the <tt class="docutils literal"><span class="pre">ESCAPE</span></tt>
keyword, e.g.:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="n">somecolumn</span><span class="o">.</span><span class="n">ilike</span><span class="p">(</span><span class="s">&quot;foo/%bar&quot;</span><span class="p">,</span> <span class="n">escape</span><span class="o">=</span><span class="s">&quot;/&quot;</span><span class="p">)</span></pre></div>
</div>
</li>
</ul>
</td>
</tr>
</tbody>
</table>
<div class="admonition-see-also admonition seealso">
<p class="first admonition-title">See also</p>
<p class="last"><a class="reference internal" href="../core/expression_api.html#sqlalchemy.sql.operators.ColumnOperators.like" title="sqlalchemy.sql.operators.ColumnOperators.like"><tt class="xref py py-meth docutils literal"><span class="pre">ColumnOperators.like()</span></tt></a></p>
</div>
</dd></dl>

<dl class="method">
<dt id="sqlalchemy.orm.attributes.QueryableAttribute.in_">
<tt class="descname">in_</tt><big>(</big><em>other</em><big>)</big><a class="headerlink" href="#sqlalchemy.orm.attributes.QueryableAttribute.in_" title="Permalink to this definition">¶</a></dt>
<dd><div class="inherited-member container">
<em>inherited from the</em> <a class="reference internal" href="../core/expression_api.html#sqlalchemy.sql.operators.ColumnOperators.in_" title="sqlalchemy.sql.operators.ColumnOperators.in_"><tt class="xref py py-meth docutils literal"><span class="pre">in_()</span></tt></a> <em>method of</em> <a class="reference internal" href="../core/expression_api.html#sqlalchemy.sql.operators.ColumnOperators" title="sqlalchemy.sql.operators.ColumnOperators"><tt class="xref py py-class docutils literal"><span class="pre">ColumnOperators</span></tt></a></div>
<p>Implement the <tt class="docutils literal"><span class="pre">in</span></tt> operator.</p>
<p>In a column context, produces the clause <tt class="docutils literal"><span class="pre">a</span> <span class="pre">IN</span> <span class="pre">other</span></tt>.
&#8220;other&#8221; may be a tuple/list of column expressions,
or a <a class="reference internal" href="../core/expression_api.html#sqlalchemy.sql.expression.select" title="sqlalchemy.sql.expression.select"><tt class="xref py py-func docutils literal"><span class="pre">select()</span></tt></a> construct.</p>
</dd></dl>

<dl class="attribute">
<dt id="sqlalchemy.orm.attributes.QueryableAttribute.info">
<tt class="descname">info</tt><a class="headerlink" href="#sqlalchemy.orm.attributes.QueryableAttribute.info" title="Permalink to this definition">¶</a></dt>
<dd><p>Return the &#8216;info&#8217; dictionary for the underlying SQL element.</p>
<p>The behavior here is as follows:</p>
<ul class="simple">
<li>If the attribute is a column-mapped property, i.e.
<a class="reference internal" href="#sqlalchemy.orm.properties.ColumnProperty" title="sqlalchemy.orm.properties.ColumnProperty"><tt class="xref py py-class docutils literal"><span class="pre">ColumnProperty</span></tt></a>, which is mapped directly
to a schema-level <a class="reference internal" href="../core/schema.html#sqlalchemy.schema.Column" title="sqlalchemy.schema.Column"><tt class="xref py py-class docutils literal"><span class="pre">Column</span></tt></a> object, this attribute
will return the <a class="reference internal" href="../core/schema.html#sqlalchemy.schema.SchemaItem.info" title="sqlalchemy.schema.SchemaItem.info"><tt class="xref py py-attr docutils literal"><span class="pre">SchemaItem.info</span></tt></a> dictionary associated
with the core-level <a class="reference internal" href="../core/schema.html#sqlalchemy.schema.Column" title="sqlalchemy.schema.Column"><tt class="xref py py-class docutils literal"><span class="pre">Column</span></tt></a> object.</li>
<li>If the attribute is a <a class="reference internal" href="#sqlalchemy.orm.properties.ColumnProperty" title="sqlalchemy.orm.properties.ColumnProperty"><tt class="xref py py-class docutils literal"><span class="pre">ColumnProperty</span></tt></a> but is mapped to
any other kind of SQL expression other than a <a class="reference internal" href="../core/schema.html#sqlalchemy.schema.Column" title="sqlalchemy.schema.Column"><tt class="xref py py-class docutils literal"><span class="pre">Column</span></tt></a>,
the attribute will refer to the <a class="reference internal" href="#sqlalchemy.orm.interfaces.MapperProperty.info" title="sqlalchemy.orm.interfaces.MapperProperty.info"><tt class="xref py py-attr docutils literal"><span class="pre">MapperProperty.info</span></tt></a> dictionary
associated directly with the <a class="reference internal" href="#sqlalchemy.orm.properties.ColumnProperty" title="sqlalchemy.orm.properties.ColumnProperty"><tt class="xref py py-class docutils literal"><span class="pre">ColumnProperty</span></tt></a>, assuming the SQL
expression itself does not have it&#8217;s own <tt class="docutils literal"><span class="pre">.info</span></tt> attribute
(which should be the case, unless a user-defined SQL construct
has defined one).</li>
<li>If the attribute refers to any other kind of <a class="reference internal" href="#sqlalchemy.orm.interfaces.MapperProperty" title="sqlalchemy.orm.interfaces.MapperProperty"><tt class="xref py py-class docutils literal"><span class="pre">MapperProperty</span></tt></a>,
including <a class="reference internal" href="#sqlalchemy.orm.properties.RelationshipProperty" title="sqlalchemy.orm.properties.RelationshipProperty"><tt class="xref py py-class docutils literal"><span class="pre">RelationshipProperty</span></tt></a>, the attribute will refer
to the <a class="reference internal" href="#sqlalchemy.orm.interfaces.MapperProperty.info" title="sqlalchemy.orm.interfaces.MapperProperty.info"><tt class="xref py py-attr docutils literal"><span class="pre">MapperProperty.info</span></tt></a> dictionary associated with
that <a class="reference internal" href="#sqlalchemy.orm.interfaces.MapperProperty" title="sqlalchemy.orm.interfaces.MapperProperty"><tt class="xref py py-class docutils literal"><span class="pre">MapperProperty</span></tt></a>.</li>
<li>To access the <a class="reference internal" href="#sqlalchemy.orm.interfaces.MapperProperty.info" title="sqlalchemy.orm.interfaces.MapperProperty.info"><tt class="xref py py-attr docutils literal"><span class="pre">MapperProperty.info</span></tt></a> dictionary of the <a class="reference internal" href="#sqlalchemy.orm.interfaces.MapperProperty" title="sqlalchemy.orm.interfaces.MapperProperty"><tt class="xref py py-class docutils literal"><span class="pre">MapperProperty</span></tt></a>
unconditionally, including for a <a class="reference internal" href="#sqlalchemy.orm.properties.ColumnProperty" title="sqlalchemy.orm.properties.ColumnProperty"><tt class="xref py py-class docutils literal"><span class="pre">ColumnProperty</span></tt></a> that&#8217;s
associated directly with a <a class="reference internal" href="../core/schema.html#sqlalchemy.schema.Column" title="sqlalchemy.schema.Column"><tt class="xref py py-class docutils literal"><span class="pre">schema.Column</span></tt></a>, the attribute
can be referred to using <a class="reference internal" href="#sqlalchemy.orm.attributes.QueryableAttribute.property" title="sqlalchemy.orm.attributes.QueryableAttribute.property"><tt class="xref py py-attr docutils literal"><span class="pre">QueryableAttribute.property</span></tt></a>
attribute, as <tt class="docutils literal"><span class="pre">MyClass.someattribute.property.info</span></tt>.</li>
</ul>
<p class="versionadded">
<span class="versionmodified">New in version 0.8.0.</span></p>
<div class="admonition-see-also admonition seealso">
<p class="first admonition-title">See also</p>
<p><a class="reference internal" href="../core/schema.html#sqlalchemy.schema.SchemaItem.info" title="sqlalchemy.schema.SchemaItem.info"><tt class="xref py py-attr docutils literal"><span class="pre">SchemaItem.info</span></tt></a></p>
<p class="last"><a class="reference internal" href="#sqlalchemy.orm.interfaces.MapperProperty.info" title="sqlalchemy.orm.interfaces.MapperProperty.info"><tt class="xref py py-attr docutils literal"><span class="pre">MapperProperty.info</span></tt></a></p>
</div>
</dd></dl>

<dl class="method">
<dt id="sqlalchemy.orm.attributes.QueryableAttribute.is_">
<tt class="descname">is_</tt><big>(</big><em>other</em><big>)</big><a class="headerlink" href="#sqlalchemy.orm.attributes.QueryableAttribute.is_" title="Permalink to this definition">¶</a></dt>
<dd><div class="inherited-member container">
<em>inherited from the</em> <a class="reference internal" href="../core/expression_api.html#sqlalchemy.sql.operators.ColumnOperators.is_" title="sqlalchemy.sql.operators.ColumnOperators.is_"><tt class="xref py py-meth docutils literal"><span class="pre">is_()</span></tt></a> <em>method of</em> <a class="reference internal" href="../core/expression_api.html#sqlalchemy.sql.operators.ColumnOperators" title="sqlalchemy.sql.operators.ColumnOperators"><tt class="xref py py-class docutils literal"><span class="pre">ColumnOperators</span></tt></a></div>
<p>Implement the <tt class="docutils literal"><span class="pre">IS</span></tt> operator.</p>
<p>Normally, <tt class="docutils literal"><span class="pre">IS</span></tt> is generated automatically when comparing to a
value of <tt class="docutils literal"><span class="pre">None</span></tt>, which resolves to <tt class="docutils literal"><span class="pre">NULL</span></tt>.  However, explicit
usage of <tt class="docutils literal"><span class="pre">IS</span></tt> may be desirable if comparing to boolean values
on certain platforms.</p>
<p class="versionadded">
<span class="versionmodified">New in version 0.7.9.</span></p>
<div class="admonition-see-also admonition seealso">
<p class="first admonition-title">See also</p>
<p class="last"><a class="reference internal" href="../core/expression_api.html#sqlalchemy.sql.operators.ColumnOperators.isnot" title="sqlalchemy.sql.operators.ColumnOperators.isnot"><tt class="xref py py-meth docutils literal"><span class="pre">ColumnOperators.isnot()</span></tt></a></p>
</div>
</dd></dl>

<dl class="method">
<dt id="sqlalchemy.orm.attributes.QueryableAttribute.isnot">
<tt class="descname">isnot</tt><big>(</big><em>other</em><big>)</big><a class="headerlink" href="#sqlalchemy.orm.attributes.QueryableAttribute.isnot" title="Permalink to this definition">¶</a></dt>
<dd><div class="inherited-member container">
<em>inherited from the</em> <a class="reference internal" href="../core/expression_api.html#sqlalchemy.sql.operators.ColumnOperators.isnot" title="sqlalchemy.sql.operators.ColumnOperators.isnot"><tt class="xref py py-meth docutils literal"><span class="pre">isnot()</span></tt></a> <em>method of</em> <a class="reference internal" href="../core/expression_api.html#sqlalchemy.sql.operators.ColumnOperators" title="sqlalchemy.sql.operators.ColumnOperators"><tt class="xref py py-class docutils literal"><span class="pre">ColumnOperators</span></tt></a></div>
<p>Implement the <tt class="docutils literal"><span class="pre">IS</span> <span class="pre">NOT</span></tt> operator.</p>
<p>Normally, <tt class="docutils literal"><span class="pre">IS</span> <span class="pre">NOT</span></tt> is generated automatically when comparing to a
value of <tt class="docutils literal"><span class="pre">None</span></tt>, which resolves to <tt class="docutils literal"><span class="pre">NULL</span></tt>.  However, explicit
usage of <tt class="docutils literal"><span class="pre">IS</span> <span class="pre">NOT</span></tt> may be desirable if comparing to boolean values
on certain platforms.</p>
<p class="versionadded">
<span class="versionmodified">New in version 0.7.9.</span></p>
<div class="admonition-see-also admonition seealso">
<p class="first admonition-title">See also</p>
<p class="last"><a class="reference internal" href="../core/expression_api.html#sqlalchemy.sql.operators.ColumnOperators.is_" title="sqlalchemy.sql.operators.ColumnOperators.is_"><tt class="xref py py-meth docutils literal"><span class="pre">ColumnOperators.is_()</span></tt></a></p>
</div>
</dd></dl>

<dl class="method">
<dt id="sqlalchemy.orm.attributes.QueryableAttribute.like">
<tt class="descname">like</tt><big>(</big><em>other</em>, <em>escape=None</em><big>)</big><a class="headerlink" href="#sqlalchemy.orm.attributes.QueryableAttribute.like" title="Permalink to this definition">¶</a></dt>
<dd><div class="inherited-member container">
<em>inherited from the</em> <a class="reference internal" href="../core/expression_api.html#sqlalchemy.sql.operators.ColumnOperators.like" title="sqlalchemy.sql.operators.ColumnOperators.like"><tt class="xref py py-meth docutils literal"><span class="pre">like()</span></tt></a> <em>method of</em> <a class="reference internal" href="../core/expression_api.html#sqlalchemy.sql.operators.ColumnOperators" title="sqlalchemy.sql.operators.ColumnOperators"><tt class="xref py py-class docutils literal"><span class="pre">ColumnOperators</span></tt></a></div>
<p>Implement the <tt class="docutils literal"><span class="pre">like</span></tt> operator.</p>
<p>In a column context, produces the clause <tt class="docutils literal"><span class="pre">a</span> <span class="pre">LIKE</span> <span class="pre">other</span></tt>.</p>
<p>E.g.:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="n">select</span><span class="p">([</span><span class="n">sometable</span><span class="p">])</span><span class="o">.</span><span class="n">where</span><span class="p">(</span><span class="n">sometable</span><span class="o">.</span><span class="n">c</span><span class="o">.</span><span class="n">column</span><span class="o">.</span><span class="n">like</span><span class="p">(</span><span class="s">&quot;</span><span class="si">%f</span><span class="s">oobar%&quot;</span><span class="p">))</span></pre></div>
</div>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
<li><strong>other</strong> &#8211; expression to be compared</li>
<li><strong>escape</strong> &#8211; <p>optional escape character, renders the <tt class="docutils literal"><span class="pre">ESCAPE</span></tt>
keyword, e.g.:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="n">somecolumn</span><span class="o">.</span><span class="n">like</span><span class="p">(</span><span class="s">&quot;foo/%bar&quot;</span><span class="p">,</span> <span class="n">escape</span><span class="o">=</span><span class="s">&quot;/&quot;</span><span class="p">)</span></pre></div>
</div>
</li>
</ul>
</td>
</tr>
</tbody>
</table>
<div class="admonition-see-also admonition seealso">
<p class="first admonition-title">See also</p>
<p class="last"><a class="reference internal" href="../core/expression_api.html#sqlalchemy.sql.operators.ColumnOperators.ilike" title="sqlalchemy.sql.operators.ColumnOperators.ilike"><tt class="xref py py-meth docutils literal"><span class="pre">ColumnOperators.ilike()</span></tt></a></p>
</div>
</dd></dl>

<dl class="method">
<dt id="sqlalchemy.orm.attributes.QueryableAttribute.match">
<tt class="descname">match</tt><big>(</big><em>other</em>, <em>**kwargs</em><big>)</big><a class="headerlink" href="#sqlalchemy.orm.attributes.QueryableAttribute.match" title="Permalink to this definition">¶</a></dt>
<dd><div class="inherited-member container">
<em>inherited from the</em> <a class="reference internal" href="../core/expression_api.html#sqlalchemy.sql.operators.ColumnOperators.match" title="sqlalchemy.sql.operators.ColumnOperators.match"><tt class="xref py py-meth docutils literal"><span class="pre">match()</span></tt></a> <em>method of</em> <a class="reference internal" href="../core/expression_api.html#sqlalchemy.sql.operators.ColumnOperators" title="sqlalchemy.sql.operators.ColumnOperators"><tt class="xref py py-class docutils literal"><span class="pre">ColumnOperators</span></tt></a></div>
<p>Implements the &#8216;match&#8217; operator.</p>
<p>In a column context, this produces a MATCH clause, i.e.
<tt class="docutils literal"><span class="pre">MATCH</span> <span class="pre">'&lt;other&gt;'</span></tt>.  The allowed contents of <tt class="docutils literal"><span class="pre">other</span></tt>
are database backend specific.</p>
</dd></dl>

<dl class="method">
<dt id="sqlalchemy.orm.attributes.QueryableAttribute.notilike">
<tt class="descname">notilike</tt><big>(</big><em>other</em>, <em>escape=None</em><big>)</big><a class="headerlink" href="#sqlalchemy.orm.attributes.QueryableAttribute.notilike" title="Permalink to this definition">¶</a></dt>
<dd><div class="inherited-member container">
<em>inherited from the</em> <a class="reference internal" href="../core/expression_api.html#sqlalchemy.sql.operators.ColumnOperators.notilike" title="sqlalchemy.sql.operators.ColumnOperators.notilike"><tt class="xref py py-meth docutils literal"><span class="pre">notilike()</span></tt></a> <em>method of</em> <a class="reference internal" href="../core/expression_api.html#sqlalchemy.sql.operators.ColumnOperators" title="sqlalchemy.sql.operators.ColumnOperators"><tt class="xref py py-class docutils literal"><span class="pre">ColumnOperators</span></tt></a></div>
<p>implement the <tt class="docutils literal"><span class="pre">NOT</span> <span class="pre">ILIKE</span></tt> operator.</p>
<p>This is equivalent to using negation with
<a class="reference internal" href="../core/expression_api.html#sqlalchemy.sql.operators.ColumnOperators.ilike" title="sqlalchemy.sql.operators.ColumnOperators.ilike"><tt class="xref py py-meth docutils literal"><span class="pre">ColumnOperators.ilike()</span></tt></a>, i.e. <tt class="docutils literal"><span class="pre">~x.ilike(y)</span></tt>.</p>
<p class="versionadded">
<span class="versionmodified">New in version 0.8.</span></p>
<div class="admonition-see-also admonition seealso">
<p class="first admonition-title">See also</p>
<p class="last"><a class="reference internal" href="../core/expression_api.html#sqlalchemy.sql.operators.ColumnOperators.ilike" title="sqlalchemy.sql.operators.ColumnOperators.ilike"><tt class="xref py py-meth docutils literal"><span class="pre">ColumnOperators.ilike()</span></tt></a></p>
</div>
</dd></dl>

<dl class="method">
<dt id="sqlalchemy.orm.attributes.QueryableAttribute.notin_">
<tt class="descname">notin_</tt><big>(</big><em>other</em><big>)</big><a class="headerlink" href="#sqlalchemy.orm.attributes.QueryableAttribute.notin_" title="Permalink to this definition">¶</a></dt>
<dd><div class="inherited-member container">
<em>inherited from the</em> <a class="reference internal" href="../core/expression_api.html#sqlalchemy.sql.operators.ColumnOperators.notin_" title="sqlalchemy.sql.operators.ColumnOperators.notin_"><tt class="xref py py-meth docutils literal"><span class="pre">notin_()</span></tt></a> <em>method of</em> <a class="reference internal" href="../core/expression_api.html#sqlalchemy.sql.operators.ColumnOperators" title="sqlalchemy.sql.operators.ColumnOperators"><tt class="xref py py-class docutils literal"><span class="pre">ColumnOperators</span></tt></a></div>
<p>implement the <tt class="docutils literal"><span class="pre">NOT</span> <span class="pre">IN</span></tt> operator.</p>
<p>This is equivalent to using negation with <a class="reference internal" href="../core/expression_api.html#sqlalchemy.sql.operators.ColumnOperators.in_" title="sqlalchemy.sql.operators.ColumnOperators.in_"><tt class="xref py py-meth docutils literal"><span class="pre">ColumnOperators.in_()</span></tt></a>,
i.e. <tt class="docutils literal"><span class="pre">~x.in_(y)</span></tt>.</p>
<p class="versionadded">
<span class="versionmodified">New in version 0.8.</span></p>
<div class="admonition-see-also admonition seealso">
<p class="first admonition-title">See also</p>
<p class="last"><a class="reference internal" href="../core/expression_api.html#sqlalchemy.sql.operators.ColumnOperators.in_" title="sqlalchemy.sql.operators.ColumnOperators.in_"><tt class="xref py py-meth docutils literal"><span class="pre">ColumnOperators.in_()</span></tt></a></p>
</div>
</dd></dl>

<dl class="method">
<dt id="sqlalchemy.orm.attributes.QueryableAttribute.notlike">
<tt class="descname">notlike</tt><big>(</big><em>other</em>, <em>escape=None</em><big>)</big><a class="headerlink" href="#sqlalchemy.orm.attributes.QueryableAttribute.notlike" title="Permalink to this definition">¶</a></dt>
<dd><div class="inherited-member container">
<em>inherited from the</em> <a class="reference internal" href="../core/expression_api.html#sqlalchemy.sql.operators.ColumnOperators.notlike" title="sqlalchemy.sql.operators.ColumnOperators.notlike"><tt class="xref py py-meth docutils literal"><span class="pre">notlike()</span></tt></a> <em>method of</em> <a class="reference internal" href="../core/expression_api.html#sqlalchemy.sql.operators.ColumnOperators" title="sqlalchemy.sql.operators.ColumnOperators"><tt class="xref py py-class docutils literal"><span class="pre">ColumnOperators</span></tt></a></div>
<p>implement the <tt class="docutils literal"><span class="pre">NOT</span> <span class="pre">LIKE</span></tt> operator.</p>
<p>This is equivalent to using negation with
<a class="reference internal" href="../core/expression_api.html#sqlalchemy.sql.operators.ColumnOperators.like" title="sqlalchemy.sql.operators.ColumnOperators.like"><tt class="xref py py-meth docutils literal"><span class="pre">ColumnOperators.like()</span></tt></a>, i.e. <tt class="docutils literal"><span class="pre">~x.like(y)</span></tt>.</p>
<p class="versionadded">
<span class="versionmodified">New in version 0.8.</span></p>
<div class="admonition-see-also admonition seealso">
<p class="first admonition-title">See also</p>
<p class="last"><a class="reference internal" href="../core/expression_api.html#sqlalchemy.sql.operators.ColumnOperators.like" title="sqlalchemy.sql.operators.ColumnOperators.like"><tt class="xref py py-meth docutils literal"><span class="pre">ColumnOperators.like()</span></tt></a></p>
</div>
</dd></dl>

<dl class="method">
<dt id="sqlalchemy.orm.attributes.QueryableAttribute.nullsfirst">
<tt class="descname">nullsfirst</tt><big>(</big><big>)</big><a class="headerlink" href="#sqlalchemy.orm.attributes.QueryableAttribute.nullsfirst" title="Permalink to this definition">¶</a></dt>
<dd><div class="inherited-member container">
<em>inherited from the</em> <a class="reference internal" href="../core/expression_api.html#sqlalchemy.sql.operators.ColumnOperators.nullsfirst" title="sqlalchemy.sql.operators.ColumnOperators.nullsfirst"><tt class="xref py py-meth docutils literal"><span class="pre">nullsfirst()</span></tt></a> <em>method of</em> <a class="reference internal" href="../core/expression_api.html#sqlalchemy.sql.operators.ColumnOperators" title="sqlalchemy.sql.operators.ColumnOperators"><tt class="xref py py-class docutils literal"><span class="pre">ColumnOperators</span></tt></a></div>
<p>Produce a <a class="reference internal" href="../core/expression_api.html#sqlalchemy.sql.expression.nullsfirst" title="sqlalchemy.sql.expression.nullsfirst"><tt class="xref py py-func docutils literal"><span class="pre">nullsfirst()</span></tt></a> clause against the
parent object.</p>
</dd></dl>

<dl class="method">
<dt id="sqlalchemy.orm.attributes.QueryableAttribute.nullslast">
<tt class="descname">nullslast</tt><big>(</big><big>)</big><a class="headerlink" href="#sqlalchemy.orm.attributes.QueryableAttribute.nullslast" title="Permalink to this definition">¶</a></dt>
<dd><div class="inherited-member container">
<em>inherited from the</em> <a class="reference internal" href="../core/expression_api.html#sqlalchemy.sql.operators.ColumnOperators.nullslast" title="sqlalchemy.sql.operators.ColumnOperators.nullslast"><tt class="xref py py-meth docutils literal"><span class="pre">nullslast()</span></tt></a> <em>method of</em> <a class="reference internal" href="../core/expression_api.html#sqlalchemy.sql.operators.ColumnOperators" title="sqlalchemy.sql.operators.ColumnOperators"><tt class="xref py py-class docutils literal"><span class="pre">ColumnOperators</span></tt></a></div>
<p>Produce a <a class="reference internal" href="../core/expression_api.html#sqlalchemy.sql.expression.nullslast" title="sqlalchemy.sql.expression.nullslast"><tt class="xref py py-func docutils literal"><span class="pre">nullslast()</span></tt></a> clause against the
parent object.</p>
</dd></dl>

<dl class="method">
<dt id="sqlalchemy.orm.attributes.QueryableAttribute.op">
<tt class="descname">op</tt><big>(</big><em>opstring</em>, <em>precedence=0</em><big>)</big><a class="headerlink" href="#sqlalchemy.orm.attributes.QueryableAttribute.op" title="Permalink to this definition">¶</a></dt>
<dd><div class="inherited-member container">
<em>inherited from the</em> <a class="reference internal" href="../core/expression_api.html#sqlalchemy.sql.operators.Operators.op" title="sqlalchemy.sql.operators.Operators.op"><tt class="xref py py-meth docutils literal"><span class="pre">op()</span></tt></a> <em>method of</em> <a class="reference internal" href="../core/expression_api.html#sqlalchemy.sql.operators.Operators" title="sqlalchemy.sql.operators.Operators"><tt class="xref py py-class docutils literal"><span class="pre">Operators</span></tt></a></div>
<p>produce a generic operator function.</p>
<p>e.g.:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="n">somecolumn</span><span class="o">.</span><span class="n">op</span><span class="p">(</span><span class="s">&quot;*&quot;</span><span class="p">)(</span><span class="mi">5</span><span class="p">)</span></pre></div>
</div>
<p>produces:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="n">somecolumn</span> <span class="o">*</span> <span class="mi">5</span></pre></div>
</div>
<p>This function can also be used to make bitwise operators explicit. For
example:</p>
<div class="highlight-python"><div class="highlight"><pre><span class="n">somecolumn</span><span class="o">.</span><span class="n">op</span><span class="p">(</span><span class="s">&#39;&amp;&#39;</span><span class="p">)(</span><span class="mh">0xff</span><span class="p">)</span></pre></div>
</div>
<p>is a bitwise AND of the value in <tt class="docutils literal"><span class="pre">somecolumn</span></tt>.</p>
<table class="docutils field-list" frame="void" rules="none">
<col class="field-name" />
<col class="field-body" />
<tbody valign="top">
<tr class="field-odd field"><th class="field-name">Parameters:</th><td class="field-body"><ul class="first last simple">
<li><strong>operator</strong> &#8211; a string which will be output as the infix operator
between this element and the expression passed to the
generated function.</li>
<li><strong>precedence</strong> &#8211; <p>precedence to apply to the operator, when
parenthesizing expressions.  A lower number will cause the expression
to be parenthesized when applied against another operator with
higher precedence.  The default value of <tt class="docutils literal"><span class="pre">0</span></tt> is lower than all
operators except for the comma (<tt class="docutils literal"><span class="pre">,</span></tt>) and <tt class="docutils literal"><span class="pre">AS</span></tt> operators.
A value of 100 will be higher or equal to all operators, and -100
will be lower than or equal to all operators.</p>
<p class="versionadded">
<span class="versionmodified">New in version 0.8: </span>- added the &#8216;precedence&#8217; argument.</p>
</li>
</ul>
</td>
</tr>
</tbody>
</table>
<div class="admonition-see-also admonition seealso">
<p class="first admonition-title">See also</p>
<p class="last"><a class="reference internal" href="../core/types.html#types-operators"><em>Redefining and Creating New Operators</em></a></p>
</div>
</dd></dl>

<dl class="attribute">
<dt id="sqlalchemy.orm.attributes.QueryableAttribute.parent">
<tt class="descname">parent</tt><a class="headerlink" href="#sqlalchemy.orm.attributes.QueryableAttribute.parent" title="Permalink to this definition">¶</a></dt>
<dd><p>Return an inspection instance representing the parent.</p>
<p>This will be either an instance of <a class="reference internal" href="mapper_config.html#sqlalchemy.orm.mapper.Mapper" title="sqlalchemy.orm.mapper.Mapper"><tt class="xref py py-class docutils literal"><span class="pre">Mapper</span></tt></a>
or <a class="reference internal" href="query.html#sqlalchemy.orm.util.AliasedInsp" title="sqlalchemy.orm.util.AliasedInsp"><tt class="xref py py-class docutils literal"><span class="pre">AliasedInsp</span></tt></a>, depending upon the nature
of the parent entity which this attribute is associated
with.</p>
</dd></dl>

<dl class="attribute">
<dt id="sqlalchemy.orm.attributes.QueryableAttribute.property">
<tt class="descname">property</tt><a class="headerlink" href="#sqlalchemy.orm.attributes.QueryableAttribute.property" title="Permalink to this definition">¶</a></dt>
<dd><p>Return the <a class="reference internal" href="#sqlalchemy.orm.interfaces.MapperProperty" title="sqlalchemy.orm.interfaces.MapperProperty"><tt class="xref py py-class docutils literal"><span class="pre">MapperProperty</span></tt></a> associated with this
<a class="reference internal" href="#sqlalchemy.orm.attributes.QueryableAttribute" title="sqlalchemy.orm.attributes.QueryableAttribute"><tt class="xref py py-class docutils literal"><span class="pre">QueryableAttribute</span></tt></a>.</p>
<p>Return values here will commonly be instances of
<a class="reference internal" href="#sqlalchemy.orm.properties.ColumnProperty" title="sqlalchemy.orm.properties.ColumnProperty"><tt class="xref py py-class docutils literal"><span class="pre">ColumnProperty</span></tt></a> or <a class="reference internal" href="#sqlalchemy.orm.properties.RelationshipProperty" title="sqlalchemy.orm.properties.RelationshipProperty"><tt class="xref py py-class docutils literal"><span class="pre">RelationshipProperty</span></tt></a>.</p>
</dd></dl>

<dl class="method">
<dt id="sqlalchemy.orm.attributes.QueryableAttribute.startswith">
<tt class="descname">startswith</tt><big>(</big><em>other</em>, <em>**kwargs</em><big>)</big><a class="headerlink" href="#sqlalchemy.orm.attributes.QueryableAttribute.startswith" title="Permalink to this definition">¶</a></dt>
<dd><div class="inherited-member container">
<em>inherited from the</em> <a class="reference internal" href="../core/expression_api.html#sqlalchemy.sql.operators.ColumnOperators.startswith" title="sqlalchemy.sql.operators.ColumnOperators.startswith"><tt class="xref py py-meth docutils literal"><span class="pre">startswith()</span></tt></a> <em>method of</em> <a class="reference internal" href="../core/expression_api.html#sqlalchemy.sql.operators.ColumnOperators" title="sqlalchemy.sql.operators.ColumnOperators"><tt class="xref py py-class docutils literal"><span class="pre">ColumnOperators</span></tt></a></div>
<p>Implement the <tt class="docutils literal"><span class="pre">startwith</span></tt> operator.</p>
<p>In a column context, produces the clause <tt class="docutils literal"><span class="pre">LIKE</span> <span class="pre">'&lt;other&gt;%'</span></tt></p>
</dd></dl>

</dd></dl>

</div>

    </div>

</div>

<div id="docs-bottom-navigation" class="docs-navigation-links">
        Previous:
        <a href="exceptions.html" title="previous chapter">ORM Exceptions</a>
        Next:
        <a href="../core/index.html" title="next chapter">SQLAlchemy Core</a>

    <div id="docs-copyright">
        &copy; <a href="../copyright.html">Copyright</a> 2007-2013, the SQLAlchemy authors and contributors.
        Created using <a href="http://sphinx.pocoo.org/">Sphinx</a> 1.1.3.
    </div>
</div>

</div>

        
    </body>
</html>


